The_Dude_1978 Posted November 10, 2006 Posted November 10, 2006 Hi There,I want to use the copy and xcopy command in RunOnceEx.cmd.Furthermore I want to use del in RunOnceEx.cmdAnd I want to use the REG ADD "HKCU\Control Panel\Desktop" /v ScreenSaveTimeOut /t REG_SZ /d 1800 /F in RunOnceEx.cmdAnd I want to use Net localgroup Administrators /add "EU\Domain Admins in RunOnceEx.cmdMaybe the most important thing i need to know is how to use the double quotation marks. It's my understanding that when putting 4 "" "" in RunOnceEx the command you give regedit don't understand.I tried several times, but it's killing me.Who can help me out with this?Greetz
oioldman Posted November 10, 2006 Posted November 10, 2006 an example of xcopy in actionREG ADD %KEY%\030 /V 4 /D "%WINDIR%\system32\xcopy /C /V /Q /Y /I %CDROM%\Apps\AcrobatReader\*.* \"C:\Program Files\Adobe\Acrobat 7.0\Setup Files\RdrBig708\ENU"\" /f and it works every time for mei don't use REG ADD to add a key. i normally use thisREG ADD %KEY%\040 /V 2 /D "REGEDIT /S %CDROM%\Apps\<appname>\<filename>.reg" /fso based on teh top option i reckon using something like REG ADD %KEY%\030 /V 4 /D "%WINDIR%\system32\net use <command>" /fwould work
Plamdi Posted November 10, 2006 Posted November 10, 2006 (edited) You don't use double quotations, you use \". Example:REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\001 /V 1 /D "%~d0\PROGRAMS\DOTNETFX.EXE/Q /C:\"INSTALL.EXE /Q\"" /FThe above should be one line.By the way, there is an error in first code snippet posted by oioldman, see if you can spot it. Edited November 10, 2006 by Plamdi
Rambler Posted November 10, 2006 Posted November 10, 2006 By the way, there is an error in first code snippet posted by oioldman, see if you can spot it.The last backslash is in wrong position. Do I get a cookie now?
oioldman Posted November 10, 2006 Posted November 10, 2006 (edited) thanks guys, but is has always worked! Edited November 10, 2006 by oioldman
The_Dude_1978 Posted November 10, 2006 Author Posted November 10, 2006 Thanks for the tips guy's.It's almost weekend so i'll not get this done in time.But to answer your question:REG ADD %KEY%\030 /V 4 /D "%WINDIR%\system32\xcopy /C /V /Q /Y /I %CDROM%\Apps\AcrobatReader\*.* \"C:\Program Files\Adobe\Acrobat 7.0\Setup Files\RdrBig708\ENU"\" /fShould be:REG ADD %KEY%\030 /V 4 /D "%WINDIR%\system32\xcopy /C /V /Q /Y /I %CDROM%\Apps\AcrobatReader\*.* \"C:\Program Files\Adobe\Acrobat 7.0\Setup Files\RdrBig708\ENU\"" /fright?But yours is more confusing:REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\001 /V 1 /D "%~d0\PROGRAMS\DOTNETFX.EXE/Q /C:\"INSTALL.EXE /Q\"" /FAnd by the way, what's the %~d0 in heavens name? :SI would guess it would be: REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\001 /V 1 /D "%CDROM%\PROGRAMS\DOTNETFX.EXE /Q \"C:\"INSTALL.EXE /Q\"" /FDo i'm not sure what you mean by /Q and why it turns into install.exeJust wonderingGreetz
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now