Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

VBScript: WshShell.run method fails w/ FFFFFFFE after CD to junction point

$
0
0

Hi folks,

I have a vbs that has been running happily for quite some time and recently - I believe after some Windows updates - has started to fail on several machines in a way that my Google-Fu has not been able to find similar issues.  This is running on Windows 7 HP SP1

After debugging I boiled the problem down to the following snippet which reproduces the issue:

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.CurrentDirectory = "C:\juncDir"  ' junction to C:\Windows
'WshShell.CurrentDirectory = "C:\linkDir"  ' symlink to C:\Windows
'WshShell.CurrentDirectory = "C:\Windows"
startCmd = "cmd /k echo DEBUG STARTED"
WshShell.Run startCmd, 1, True

If I invoke Run after changing to a junction point or symlink then the I get an error popup indicating Error: (null), Code: FFFFFFFE, Source: (null) at the beginning of the line with the Run.  This used to work.

If I CD to a normal directory it works. 

If I use Exec (with appropriate parameter changes) instead of Run it works for any of the junction/symlink/normal directory but this is not desirable as I need the window control & sync execution of Run.

Ideas?

Thanks, Derek


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>