Hello all,
I have been mostly successful in setting up my script which basically shows the system hardware specs and installs several software packages in a specific order. However, I have run into a few problems that I can't seem to overcome and I was hoping you guys could assist me.
1. How do you set a temporary path in vbscript? In DOS, all I had to do was type:
set path="C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\j2sdk1.4.2_04\bin"
2. How do you tell vbscript bring up the command prompt and have it change directories to a specific folder so that I can execute a dos based program from that folder?
3. Is there a way to tell vbscript to scan a particular drive for a executable and launch it once it has found it? Right now, I am using an input box for the user to specify a path where all the files are stored so that they can be launched. It works fine, but I just wanted to see if there was an easier way to do this without the user typing in a path.
4. I can get the vbcancel button to wscript.quit in this segment of my code:
Sub Intro
user1 = InputBox ("Enter the path where all the files for the **** installation are stored?", "**** Installer v5.0b Build 1550")
set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(user1) Then
WScript.Echo "path is valid, preparing to launch script."
Else WScript.Echo "Please input a valid path."
Call Intro
End If
Call Java
End Sub
I removed the wscript.quit reference from the code all together because I kept getting a type mismatch error. Can you guys give me some pointers to get that working. It is driving me nuts. I am using Option Explicit and declaring all my variables at the beginning of my code.
I appreciate your assistance and any help would be greatly appreciated! Thanks in advance!
I have been mostly successful in setting up my script which basically shows the system hardware specs and installs several software packages in a specific order. However, I have run into a few problems that I can't seem to overcome and I was hoping you guys could assist me.
1. How do you set a temporary path in vbscript? In DOS, all I had to do was type:
set path="C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\j2sdk1.4.2_04\bin"
2. How do you tell vbscript bring up the command prompt and have it change directories to a specific folder so that I can execute a dos based program from that folder?
3. Is there a way to tell vbscript to scan a particular drive for a executable and launch it once it has found it? Right now, I am using an input box for the user to specify a path where all the files are stored so that they can be launched. It works fine, but I just wanted to see if there was an easier way to do this without the user typing in a path.
4. I can get the vbcancel button to wscript.quit in this segment of my code:
Sub Intro
user1 = InputBox ("Enter the path where all the files for the **** installation are stored?", "**** Installer v5.0b Build 1550")
set fso = CreateObject("Scripting.FileSystemObject")
If fso.FolderExists(user1) Then
WScript.Echo "path is valid, preparing to launch script."
Else WScript.Echo "Please input a valid path."
Call Intro
End If
Call Java
End Sub
I removed the wscript.quit reference from the code all together because I kept getting a type mismatch error. Can you guys give me some pointers to get that working. It is driving me nuts. I am using Option Explicit and declaring all my variables at the beginning of my code.
I appreciate your assistance and any help would be greatly appreciated! Thanks in advance!