|
-
Apr 15th, 2003, 09:42 AM
#1
Thread Starter
Frenzied Member
Autorun install *unresolved*
How can I autorun an installation program from a cd only when the application is not installed?
Last edited by dj4uk; Apr 16th, 2003 at 04:15 AM.
-
Apr 15th, 2003, 11:33 AM
#2
Thread Starter
Frenzied Member
Ok then - if I wrote a small vb app that is the autorun file then could I make this check to see if the full app is installed and if it isn't lauch the installer? Only problem I can see with this is would the small app need an installer too? Argghhhh!
-
Apr 16th, 2003, 03:08 AM
#3
Thread Starter
Frenzied Member
-
Apr 16th, 2003, 04:15 AM
#4
Thread Starter
Frenzied Member
OK I've researched a bit more so I can refine my question a tad...
I need to produce an autorun cd - this seems easy enough - just use a autorun.inf file containing the path to the installation program. However as I need to check to see if there has been a previous installation I need to check for the existance of an ini file in the windows directory.
The only way to do this (correct me if I'm wrong) is to write a small exe (called by autorun.inf) that checks to see if this ini exists and if it doesn't launch the full installation prog if it does it will just terminate. (At some point during the full installation the ini file will be created in the windows directory).
As this small exe will be written in VB what do I do about all the dlls needed to run it? Also as far as I can tell I need another dll (shlwapi.dll) to check if the file exists. I presume if I just drop the exe on the cd without these dlls it will just fail?
-
Apr 16th, 2003, 05:02 AM
#5
you should be able to just install ALL required Dll's etc to the same path as the executable file, and it will run even tho the DLL's etc haven't been installed.
-
Apr 16th, 2003, 05:10 AM
#6
Thread Starter
Frenzied Member
Ok so let me get this straight...
If I create a CD with the exe in the root directory along with all the dlls it uses in the root directory even if I don't register them it should work?
-
Apr 16th, 2003, 05:17 AM
#7
Hyperactive Member
OK don`t know if that works but I would try something like that:
Let your application create a registry key on first use.
Then write a small vbscript that checks if the entry allready exists, and if it it doesnt, run the instll prog, else do nothing.
Your autorun.inf file of course then has to contain the path to your vbscript!
Hope I could help,
Stephan
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
-
Apr 16th, 2003, 05:20 AM
#8
Thread Starter
Frenzied Member
Sgt-Peppa - sounds about right - any idea how to access the registry with vbscript?
-
Apr 16th, 2003, 05:37 AM
#9
Hyperactive Member
Heres an example of how to use the registry with vbscript
VB Code:
Set WshShell = CreateObject("WScript.Shell")
On Error Resume Next
WshShell.RegRead "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\PEPTool"
If Err.Number <> 0 Then
WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\PEPTool", App.Path, "REG_SZ"
Err.Clear
End If
Set WshShell = Nothing
As you can see i used this from a vb Programm, but with slight changes you can use that in an script too!
BTW: Just dont use that key, it makes your prog run on auto start.
Hope I could help,
Stephan
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
-
Apr 16th, 2003, 05:43 AM
#10
Thread Starter
Frenzied Member
Yep thats great cheers!
Is the WScript object accessible from all versions of windows?
-
Apr 16th, 2003, 05:47 AM
#11
Hyperactive Member
Dont know for sure but as far as I know, wsh is installed with Win 98SE and later versions and also IE..dont know which version4.1 maybe. I can look that up for you when I am at home!
Hope I could help,
Stephan
Keep Smiling - even if its hard 
Frankie Says Relax, wossname Says Yeah!
wossname:--Currently I'm wearing a gimp suit and a parachute.
C# - Base64 Blog
-
Apr 16th, 2003, 05:49 AM
#12
Thread Starter
Frenzied Member
That would be cool!
Thanks for all your help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|