So many approaches... you could also use .exec instead of .run, and so get your scripted hands on stdout and stderr.
-----Original Message----- From: Ken Schaefer [mailto:[email protected]] Sent: Thursday, January 22, 2009 7:32 pm To: NT System Admin Issues Subject: RE: Retaining permissions when copying folders That is one way. Another way is to do: intReturn = WShell.Run(...) and that should give you the exit code from the other window. Or lastly, WScript.Echo <cmd here> that you were going to put into WSHell.Run, and then cut and paste the command into a new window and run it to see what error is returned. HTH Cheers Ken -----Original Message----- From: Ben Scott [mailto:[email protected]] Sent: Friday, 23 January 2009 2:28 PM To: NT System Admin Issues Subject: Re: Retaining permissions when copying folders On Thu, Jan 22, 2009 at 10:18 PM, Ben Scott <[email protected]> wrote: > OP has a command that's failing, and failing too quickly to see what > the output is. I just thought of a possible way: Wrap the XCOPY command in CMD with the /K switch. RunWait ("CMD /K XCOPY blah blah blah") New window will open, execute XCOPY, and then give a command prompt. Not as nice as "Finished" and waiting for the user to click "Close", but good enough for debugging. (Second time I've replied to myself in this thread. I need a vacation.) ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~ ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
