Jump to content

Recommended Posts

Posted

Hi!

I use the following code to add a registry key to RunOnceEx.

REG ADD %KEY%\001 /V 1 /D "setup.exe /K:1234" /f

But because of the colon (":") after the letter "K" this is condemned to fail. :( Why? In this case reg add only adds the stuff after the colon, everything in front of it is utterly ignored. :wacko:

Is there any way to make this work regardless of the colon? thx a lot!


Posted

I have run a little test and I get setup.exe /K:1234 entered into the registry?

I do not understand, reg add works fine here.

Posted

Thanks for your answer, still strange cuz here it doesn't work. It only adds everything _behind_ the colon. But if you tell me it's generally working it has to be sth different. ic

Posted

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY%\001 /VE /D "Setup" /f
REG ADD %KEY%\001 /V 1 /D "setup.exe /K:1234" /f

This is what i tested with. Run it and checked the runonceex key. It is there.

Posted

I've tested it for you and got the same result as MHz got.

If it's not working for you this way, you can import it via a reg file like this one:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\001]
@="Setup"
"1"="setup.exe /K:1234"

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