Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How do I set up and use RunOnce?

28 Feb 2016   #1
Funky Munky

Windows 7 Home Premium 64 Bit
 
 
How do I set up and use RunOnce?

Hello all.

When I do a fresh install of Windows XP, Vista, 7, etc. there are certain programs that I install through batch files after the final reboot.

I cannot combine them into one batch file because each program needs to reboot to finish the installation, and you can't continue the batch after a reboot.

Recently, I started reading about the RunOnce feature.

Before I read deeper into it, I was wondering if it could be applied to run my multiple batch files with a reboot in between.

If I read it correctly, I should be able to write the next RunOnce routine into the registry before the batch file reboots.

Or is there a better way to use this feature?

Thanks.


My System SpecsSystem Spec
.
29 Feb 2016   #2
RonWesley

Windows 10
 
 

The Windows registry includes the following two keys -

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
My System SpecsSystem Spec
29 Feb 2016   #3
Funky Munky

Windows 7 Home Premium 64 Bit
 
 

Thanks for the quick reply but those are the same 2 lines that I got from the Microsoft one page explanation.

I miss the days of assembler language / dos / gwbasic, when every command was explained in so much detail it made you want to puke.
My System SpecsSystem Spec
.

01 Mar 2016   #4
Ztruker

Windows 10 Pro X64
 
 

Google yields lots of hits on this: How do I set up and use RunOnce
My System SpecsSystem Spec
01 Mar 2016   #5
MilesAhead

Windows 7 32 bit
 
 

You can download my RunItOnce utility from my page:
Miles Ahead's Windows Downloads

To use it in a batch file just specify the full path to the exe,cmd or bat file on the command line. See the included Readme.txt file for particulars.

Edit: Note that RunItOnce launched programs actually run before the login prompt, so they should not pop up any dialog boxes or whatnot. Just do tasks like delete files before they are in use by the system etc..
My System SpecsSystem Spec
04 Mar 2016   #6
Funky Munky

Windows 7 Home Premium 64 Bit
 
 

Quote   Quote: Originally Posted by Ztruker View Post
Google yields lots of hits on this: How do I set up and use RunOnce

thanks, but I did that before i made this thread and the results were pretty useless.
My System SpecsSystem Spec
04 Mar 2016   #7
Funky Munky

Windows 7 Home Premium 64 Bit
 
 

Quote   Quote: Originally Posted by MilesAhead View Post
You can download my RunItOnce utility from my page:
Miles Ahead's Windows Downloads

To use it in a batch file just specify the full path to the exe,cmd or bat file on the command line. See the included Readme.txt file for particulars.

Edit: Note that RunItOnce launched programs actually run before the login prompt, so they should not pop up any dialog boxes or whatnot. Just do tasks like delete files before they are in use by the system etc..

thanks also, but i wanted something that I could just add to my batch file.
My System SpecsSystem Spec
04 Mar 2016   #8
Funky Munky

Windows 7 Home Premium 64 Bit
 
 

thanks to all for your helpful replies.

I posted this question in numerous forums and finally got it to work.

I just added this line to my batch file before the reboot line

reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v Install /t REG_SZ /d "C:\installing\2.bat"

cheers.

My System SpecsSystem Spec
Reply

 How do I set up and use RunOnce?




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How to put command with parms directly in Registry RunOnce?
Assume I want to perform a command line command with parameters one time at next boot (under 64bit Win 7). Therefore I want to create this command directly in the appropriate Registy key and not indirectly by putting it into *.bat batch script and and call this from RunOnce For simplicity...
General Discussion
Mysterious RunOnce Startup Registries
Something strange thing happened to my computer today, and I am hoping for feedback from techies here. WinPatrol alerted me of new RunOnce Startup items and then my computer froze. I was offline when this happened and do not use that computer to go online for surfing or anything. I was able...
System Security
Avast removing All exe's, runonce trojon
Hey guys, My avast keps flagging most of my programs as trojons under the runonce process. Have to disable avast to work anything. Tried updating and reinstalling, avast boot scan flags all executables. Problem started from a cracked game exe from my external harddrive. I installed the game...
System Security


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 22:29.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App