#194269 - 2009-06-15 08:06 PM
vbs script called from kix errors but not from command line
|
Ben_H
Fresh Scripter
Registered: 2007-05-15
Posts: 7
Loc: Indiana
|
platform: Windows 2008 64 bit, kix32 version: 4.60
I am calling an application supplied vbs script from my kix script:
run "%COMSPEC% /c start \\hawksrv1\watertight\SetupWatertightClient.vbs"
I get the following error: Windows Script Host script: \\hawksrv1\watertight\setupwatertightclient.vbs line: 91 char: 3 error: Path not found code: 800a004c Source: Microsoft VBScript Runtime error
However if I type in: %COMSPEC% /c start \\hawksrv1\watertight\SetupWatertightClient.vbs from the command line no problems, the script runs just fine. So it is hard to blame it on the script.
I've tried SHELL instead of RUN, I've tried a layer of indirection by calling a .cmd file that calls the vbs, I've tried getting rid of the "start" portion, but they all blow up!
Any Ideas?
_________________________
Ben
|
Top
|
|
|
|
#194272 - 2009-06-15 08:28 PM
Re: vbs script called from kix errors but not from command line
[Re: Glenn Barnas]
|
Ben_H
Fresh Scripter
Registered: 2007-05-15
Posts: 7
Loc: Indiana
|
results with drive letter and cscript are the same:
C:\Users\Administrator>w:
W:\>cd \
W:\>cscript.exe .\SetupWatertightClient.vbs Microsoft (R) Windows Script Host Version 5.7 Copyright (C) Microsoft Corporation. All rights reserved.
W:\SetupWatertightClient.vbs(91, 3) Microsoft VBScript runtime error: Path not found
And once again no problems when run directly from the command line only when run from kix.
_________________________
Ben
|
Top
|
|
|
|
#194273 - 2009-06-15 08:29 PM
Re: vbs script called from kix errors but not from command line
[Re: Gargoyle]
|
Ben_H
Fresh Scripter
Registered: 2007-05-15
Posts: 7
Loc: Indiana
|
Like I said the script behaves as expected and does not error when run from the command line only when called from kix.
_________________________
Ben
|
Top
|
|
|
|
#194281 - 2009-06-16 03:32 PM
Re: vbs script called from kix errors but not from command line
[Re: Allen]
|
Ben_H
Fresh Scripter
Registered: 2007-05-15
Posts: 7
Loc: Indiana
|
OK, I actually put some debugging code in the vbs script:
msgbox(oShell.ExpandEnvironmentStrings("%programfiles%"))
Does anybody know why the above returns "c:\program files" when run from the command line, but "c:\program files(x86)" when run from kix?
_________________________
Ben
|
Top
|
|
|
|
#194317 - 2009-06-18 09:31 PM
Re: vbs script called from kix errors but not from command line
[Re: Richard H.]
|
Ben_H
Fresh Scripter
Registered: 2007-05-15
Posts: 7
Loc: Indiana
|
Thanks
_________________________
Ben
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 248 anonymous users online.
|
|
|