i've got a training show to run and the only i can think of is through a batch file calling 2 separate .VBS files. It appears to run fine ONLY if i pause the batch file.
Batch File looks like this:
Driving1.vbs looks like this:
Driving2.vbs looks like this:
i'm trying to make this as invisible to users as possible so they can obtain their required training with as little effort as possible (and as unbreakable as possible). When i remove the "Pause" statements in the .BAT file i get errors that "Folder2\Data cannot be found". When i leave the "Pause" statements in it works correctly, but leaves the DOS screen visible and prompts to "Press a key...". i've also tried going directly to the .HTML file with VBscript but get the "Folder2\Data cannot be found" error (\Data is where the whole thing is actually run from, the "Start.html" is just the wrapper). It's one of those things that everyone must do and i have no say how it's put together, just get it out the door.
Why would it work with the "Pause" statements in effect and not with them removed?
Thanks,
Dave
Batch File looks like this:
Code:
ECHO OFF
Driving1.vbs
Pause
x:
Pause
Start.html
Pause
J:
cd \(original folder goes here)
Driving2.vbs
REM pause
Driving1.vbs looks like this:
Code:
On Error Resume Next
Dim objNet
Set objNet = CreateObject("Wscript.Network")
objNet.MapNetworkDrive "X:", "\\ServerName\Folder1\Folder2"
Code:
On Error Resume Next
Dim objNet
Set objNet = CreateObject("wScript.Network")
objNet.RemoveNetworkDrive "X:"
i'm trying to make this as invisible to users as possible so they can obtain their required training with as little effort as possible (and as unbreakable as possible). When i remove the "Pause" statements in the .BAT file i get errors that "Folder2\Data cannot be found". When i leave the "Pause" statements in it works correctly, but leaves the DOS screen visible and prompts to "Press a key...". i've also tried going directly to the .HTML file with VBscript but get the "Folder2\Data cannot be found" error (\Data is where the whole thing is actually run from, the "Start.html" is just the wrapper). It's one of those things that everyone must do and i have no say how it's put together, just get it out the door.
Why would it work with the "Pause" statements in effect and not with them removed?
Thanks,
Dave