Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
[TiLT]

How to get Run/RunOnce keys working?

Recommended Posts

I can add the keys fine after Vista is installed, but if I add them in during setup they're wiped clean before the first user logs on.

the HKCU RunOnce branch is actually removed in it's entirety. but it works fine if I add the key manually after the user logs on.

Share this post


Link to post
Share on other sites

woot! got it working. HKCU Run & RunOnce were being obliterated before first logon (even when I locked down permissions on them beforehand), but HKLM RunOnce stays intact.

so I used HKLM RunOnce to run a script that adds a key to HKCU RunOnce and then reboots.

I needed to use both because certain pesky registry tweaks will only "stick" if run from HKCU, while others only "stick" when run from HKLM.

Had to combine setupcomplete.cmd with the RunOnce keys to finally set all the keys I wanted.

specialize, oobeSystem, and even auditUser passes were all (mostly) worthless.

(this was all with SP1 RTM btw)

P.S. - Another thing I noticed early on, you can't use regedit to import the Run\RunOnce keys, they won't be written. Instead I used reg add or regini. I never tried reg import.

Edited by [TiLT]

Share this post


Link to post
Share on other sites
woot! got it working. HKCU Run & RunOnce were being obliterated before first logon (even when I locked down permissions on them beforehand), but HKLM RunOnce stays intact.

so I used HKLM RunOnce to run a script that adds a key to HKCU RunOnce and then reboots.

I needed to use both because certain pesky registry tweaks will only "stick" if run from HKCU, while others only "stick" when run from HKLM.

Had to combine setupcomplete.cmd with the RunOnce keys to finally set all the keys I wanted.

specialize, oobeSystem, and even auditUser passes were all (mostly) worthless.

(this was all with SP1 RTM btw)

P.S. - Another thing I noticed early on, you can't use regedit to import the Run\RunOnce keys, they won't be written. Instead I used reg add or regini. I never tried reg import.

Glad ya got it workin..how about a tute for the few not in the know?

Share this post


Link to post
Share on other sites

use Windows\Setup\Scripts\setupcomplete.cmd to "reg add" runonce.cmd to the HKLM RunOnce

runonce.cmd then sets the HKCU RunOnce cmd that I want via "reg add" and reboots via shutdown /r.

I run all .cmd with hidec and they work fine that way.

Edit: You may be able to set the HKLM RunOnce key at another time in your unattended.xml too, but that's how I did it since I was using setupcomplete.cmd already. Hidec also works fine for batch files executed from your unattended.xml

Edited by [TiLT]

Share this post


Link to post
Share on other sites
use Windows\Setup\Scripts\setupcomplete.cmd to "reg add" runonce.cmd to the HKLM RunOnce

runonce.cmd then sets the HKCU RunOnce cmd that I want via "reg add" and reboots via shutdown /r.

I run all .cmd with hidec and they work fine that way.

Edit: You may be able to set the HKLM RunOnce key at another time in your unattended.xml too, but that's how I did it since I was using setupcomplete.cmd already. Hidec also works fine for batch files executed from your unattended.xml

Look I know where you are coming from but a simple tutorial would be helpful to some.

Share this post


Link to post
Share on other sites

use Windows\Setup\Scripts\setupcomplete.cmd to "reg add" runonce.cmd to the HKLM RunOnce

runonce.cmd then sets the HKCU RunOnce cmd that I want via "reg add" and reboots via shutdown /r.

I run all .cmd with hidec and they work fine that way.

Edit: You may be able to set the HKLM RunOnce key at another time in your unattended.xml too, but that's how I did it since I was using setupcomplete.cmd already. Hidec also works fine for batch files executed from your unattended.xml

Look I know where you are coming from but a simple tutorial would be helpful to some.

that would be nice. i don't have the time to try it right now. I use FirstLogonCommanfs for now and works great. Im now into SP1 without any hassles.

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...