warcrow Posted November 26, 2007 Share Posted November 26, 2007 Hola everyone!I'm totally new to using reg.exe and am having a bit of an (emberassing to admit!) issue. I'm trying to get two executables to run, ONLY ONCE, after a reboot. To accomplish this, I have a batch file that runs after pushing a machine. This batch file is going to include the following entries to (hopfully after you guys help me out) do this. I assume I'm on the right track here?SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Mark_Test" /fREG ADD %KEY% /VE /D "Kyocera Mita Install" /fREG ADD %KEY% /V 1 /D "c:\migration\AI_KYOCERA_MITA_INSTALL.exe" /fThis is one of the programs I'd like to run. My questions are:1) This is not working. I know that the executable is located that directory.2) What is the best way to go about adding another executable to run after this one.3) This is probably a really stupid question, but how do I make sure that this only runs once ever and under any user that logs in (it could be any of the IT staff here)?Thanks in advanced guys! Link to comment Share on other sites More sharing options...
Yzöwl Posted November 26, 2007 Share Posted November 26, 2007 The key is for local machine meaning it will run regardless of which of the IT staff log in.Your last two lines from the example given should be sub-keys of %KEY% we usually use numeric sub-keys in order to control order, though for one key I suppose you could choose any sub-key name. Link to comment Share on other sites More sharing options...
warcrow Posted November 26, 2007 Author Share Posted November 26, 2007 The key is for local machine meaning it will run regardless of which of the IT staff log in.Your last two lines from the example given should be sub-keys of %KEY% we usually use numeric sub-keys in order to control order, though for one key I suppose you could choose any sub-key name.SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Mark_Test" /fREG ADD %KEY%1 /VE /D "Kyocera Mita Install" /fREG ADD %KEY%1 /V 1 /D "c:\migration\AI_KYOCERA_MITA_INSTALL.exe" /fHow does that look? Link to comment Share on other sites More sharing options...
phkninja Posted November 26, 2007 Share Posted November 26, 2007 (edited) should beSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Mark_Test" /fREG ADD %KEY%\1 /VE /D "Kyocera Mita Install" /fREG ADD %KEY%\1 /V 1 /D "c:\migration\AI_KYOCERA_MITA_INSTALL.exe" /fThis would be better thoughSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Mark_Test" /fREG ADD %KEY%\01 /VE /D "Kyocera Mita Install" /fREG ADD %KEY%\01 /V 1 /D "c:\migration\AI_KYOCERA_MITA_INSTALL.exe" /forSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Mark_Test" /fREG ADD %KEY%\a1 /VE /D "Kyocera Mita Install" /fREG ADD %KEY%\a1 /V 1 /D "c:\migration\AI_KYOCERA_MITA_INSTALL.exe" /f Edited November 27, 2007 by phkninja Link to comment Share on other sites More sharing options...
warcrow Posted November 26, 2007 Author Share Posted November 26, 2007 I used SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Mark_Test" /fREG ADD %KEY%1 /VE /D "Kyocera Mita Install" /fREG ADD %KEY%1 /V 1 /D "c:\migration\AI_KYOCERA_MITA_INSTALL.exe" /fThrew it into a batch, ran it as an admin, rebooted and it didnt work. I'm confused. :-/ Link to comment Share on other sites More sharing options...
phkninja Posted November 27, 2007 Share Posted November 27, 2007 warcrow- you keep forgetting the \ between the %KEY% and the increment Link to comment Share on other sites More sharing options...
Yzöwl Posted November 27, 2007 Share Posted November 27, 2007 Also is anything working, ignore the installation procedure and run an existing program instead. If it still doesn't work then it's more than likely an IE7/runonce issue or similar. Link to comment Share on other sites More sharing options...
warcrow Posted November 27, 2007 Author Share Posted November 27, 2007 warcrow- you keep forgetting the \ between the %KEY% and the incrementI added the backslash and it worked! Pardon me here, but my inner geek is going to surface. This is AWESOME! There are so many possibilities here, I love it!I have another program that I'm going to add--thank you everyone for your help. Link to comment Share on other sites More sharing options...
lucas*z Posted November 28, 2007 Share Posted November 28, 2007 are u sure this appls folder take in the $1 folder?if u used CD to install, $oem$\$1 folder and i386 folder appose.if u used network to install, $oem$\$1 folder in the i386 folder. 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