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, TrueIf 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