Jump to content

Quick DOS commands question


ajua

Recommended Posts

hi there. im using a cmd file to install copytodvd but i havent got it working. when runoncex executes the cmd file for copytodvd i got two open command prompt windows, one for the setup ad one for sleep.exe to wait a few seconds, then closes the vso start window. but the setup doesnt run.

here is what im using, i believe i need to use more quotes but dont really know much on this.

cmdow @ /HID
@echo off

start "$systemdrive%\Install\copytodvd\setup.exe /VERYSILENT /SP-"
start /wait "$systemdrive%\Install\copytodvd\sleep.exe 60"
start /wait "taskkill /IM VsoStart.exe"
REGEDIT /S $systemdrive%\Install\copytodvd\settingslocal.reg
REGEDIT /S $systemdrive%\Install\copytodvd\settingsuser.reg

exit

im not sure but i think that i need some quotes for the switches of the setup and for sleep.exe time parameter. any help is appreciated. thanks in advance.

Link to comment
Share on other sites


Actually quotes are needed when part of the arguments (i.e. for example a PATH, like C:\Documens and Settings\whatever contain a space) as it seems like there are no spaces in the path, I would try taking ALL the quotes out....

However quotes must NOT surround parameters, i.e. this line:

start /wait "$systemdrive%\Install\copytodvd\sleep.exe 60"

MUST be written as:

start /wait "$systemdrive%\Install\copytodvd\sleep.exe" 60

but as said, will work as:

start /wait $systemdrive%\Install\copytodvd\sleep.exe 60

jaclaz

Link to comment
Share on other sites

also isn't it supposed to be %systemdrive% not $systemdrive%

start %systemdrive%\Install\copytodvd\setup.exe /VERYSILENT /SP-
start /wait %systemdrive%\Install\copytodvd\sleep.exe 60
start /wait taskkill /IM VsoStart.exe

Link to comment
Share on other sites

also isn't it supposed to be %systemdrive% not $systemdrive%

ha, thanks for pointing out my error. i wrote the commands in quotes after i tried first without them but i didnt noticed my awful $ mystake.

thanks. will try it now without any quotes as i always try to keep my paths without spaces to simplify reading all my scripts.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...