|
|
|||||||
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? |
||||||||
|
|
|||||||
Just for giggles.. map a drive to \\hawksrv1\watertight, CD to that drive, and then run the VBscript with Code: Shell '%COMSPEC% /c cscript.exe .\setupwatertightclient.vbs' What happens then? If that works, try the UNC path, but reference the CSCRIPT.EXE. The issue could be the child environment settings at the time you run the script. Glenn |
||||||||
|
|
|||||||
It is not getting something that it expects. Look at what is on line 91 in the VBS script to see what it needs. |
||||||||
|
|
|||||||
results with drive letter and cscript are the same: Quote: 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. |
||||||||
|
|
|||||||
Like I said the script behaves as expected and does not error when run from the command line only when called from kix. |
||||||||
|
|
|||||||
Line 91 in your vbs ... what is it? The error says: 91, 3) Microsoft VBScript runtime error: Path not found Since its not working in kix, and you are trying to make it, then this line (or lines around it) seems to be relevant to this discussion. |
||||||||
|
|
|||||||
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? |
||||||||
|
|
|||||||
Originally Posted By: Ben_H 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? Yup, look up SetOption(), specifically the file redirection option: Quote: Wow64FileRedirection ON,OFF Enables/disables file redirection on 64-bit editions of Windows. See this MSDN article for details of this feature. This option has no effect on 32-bit editions of Windows. |
||||||||
|
|
|||||||
Thanks |