Jump to content

Question about RunOnceEx options


Recommended Posts

Hi There,

I want to use the copy and xcopy command in RunOnceEx.cmd.

Furthermore I want to use del in RunOnceEx.cmd

And I want to use the REG ADD "HKCU\Control Panel\Desktop" /v ScreenSaveTimeOut /t REG_SZ /d 1800 /F in RunOnceEx.cmd

And I want to use Net localgroup Administrators /add "EU\Domain Admins in RunOnceEx.cmd

Maybe 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

Link to comment
Share on other sites


an example of xcopy in action

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"\" /f

and it works every time for me

i don't use REG ADD to add a key. i normally use this

REG ADD %KEY%\040 /V 2 /D "REGEDIT /S %CDROM%\Apps\<appname>\<filename>.reg" /f

so based on teh top option i reckon using something like

REG ADD %KEY%\030 /V 4 /D "%WINDIR%\system32\net use <command>" /f

would work

Link to comment
Share on other sites

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\"" /F

The 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 by Plamdi
Link to comment
Share on other sites

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"\" /f

Should 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\"" /f

right?

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\"" /F

And by the way, what's the %~d0 in heavens name? :S

I 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\"" /F

Do i'm not sure what you mean by /Q and why it turns into install.exe

Just wondering

Greetz

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...