Page 1 of 1

WshShell.Run ("cmd /c start """"..... always return code 0

Posted: 2021-Sep-17, 12:54 pm
by PiotrMP006
Hi

Code: Select all

errorcode = WshShell.Run ("cmd /c start """" /low /wait ""C:\Program Files\7-Zip\7zG.exe"" a -t7z -- """ & archivename & """ " & arguments, 1, True)
Always return code 0


Please help me

Re: WshShell.Run ("cmd /c start """"..... always return code 0

Posted: 2021-Sep-17, 2:02 pm
by Simon Sheppard
Use the WshShell object's Exec method instead of Run

https://stackoverflow.com/questions/606 ... from-shell