How can I execute two consecutive commands on the command line with the help of wshshell.exec or wshshell.run in vbscript? For example I need to execute cd C:\a and then winzip32.exe -min -a D:\a.
How can I execute two consecutive commands on the command line with the help
Share
You can do something like
cd C:\a & winzip32.exe -min -a D:\awhere the&separates commands so the that second one runs once the first has finished successfully. For example, you could run it like this:Without the
cmd /cin the beginning, you can’t do things likecdbecause cmd.exe is responsible for processing thecdand&.