my2001 Posted October 21, 2004 Share Posted October 21, 2004 Hi!I use the following code to add a registry key to RunOnceEx. REG ADD %KEY%\001 /V 1 /D "setup.exe /K:1234" /fBut 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. Is there any way to make this work regardless of the colon? thx a lot! Link to comment Share on other sites More sharing options...
MHz Posted October 21, 2004 Share Posted October 21, 2004 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. Link to comment Share on other sites More sharing options...
my2001 Posted October 21, 2004 Author Share Posted October 21, 2004 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 Link to comment Share on other sites More sharing options...
MHz Posted October 21, 2004 Share Posted October 21, 2004 SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY%\001 /VE /D "Setup" /fREG ADD %KEY%\001 /V 1 /D "setup.exe /K:1234" /fThis is what i tested with. Run it and checked the runonceex key. It is there. Link to comment Share on other sites More sharing options...
mazin Posted October 21, 2004 Share Posted October 21, 2004 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" Link to comment Share on other sites More sharing options...
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