Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Windows Scripting Host - Crazy update to WshShell.Run() !!

Oct 15, 2007 6:01AM PDT

I have a huge amount of automated scripts that use Windows Scripting Host. Many of them launch other apps or scripts, of course.

Following some recent Microsoft update, the following *very* common API has changed to require different formatting(!!!). Here's the comparison:

Previously:
wsh.run("C:\Program Files\bob.exe",1,false);

Now Required:
wsh.run('"' + "C:\Program Files\bob.exe" + '"',1,false);

As you can see, I'm simply wrapping the command line in quotes. I'm shocked that this is now required.

Anybody else experiencing a similar failure?!!

Gary

Discussion is locked