Hi guys,
I've been working on something that is pushing my programming limitations a bit. VBscripting :p
I simply want to do the following
Z:\program\subprogram1\set
upthis.vbs
, Z:\program\subprg2\setup this.vbs
Z:\program\setup ME.vbs
I want setup ME.vbs to call each of the subprogram's setup.vbs in order.
So I got the following,
SET fso = CreateObject("Scripting.Fi
leSystemOb
ject")
curDir = fso.GetParentFolderName(WS
cript.Scri
ptFullName
)
SET WshShell = CreateObject("WScript.Shel
l")
cmdLine = "cscript """ & curDir & "\subprogram1\setupthis.vb
s"" "
wshell.Run cmdLine, 1, true
I repeat that for the 2nd vbs file.
The problem is, when I run it, Windows keep on telling me it can't find the file, while the file is literally staring at me to my face.
i've tried it via cmd, with cscript ./subprogram1\setupthis.vb
s
that doesn't work either...
Did I do something stupid in this code??
Start Free Trial