MSFN Forum: RunOnceEx Registry Key in Windows Vista - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

RunOnceEx Registry Key in Windows Vista A workaround Rate Topic: -----

#1 User is offline   engert100 

  • Junior
  • Pip
  • Group: Members
  • Posts: 59
  • Joined: 23-June 08

Posted 08 September 2009 - 02:59 PM

Since there is very little to none information on the web regarding this topic, here are my findings:

How do i get the nice GUI on Vista during app install?

Fact: RunOnceEx key has be removed from Vista Registry

Workaround: Create the Key manually !

1. In W.S.I.M. insert a new Synchronous command in Pass 4 and point to your batch file (which can be either on your network share or locally) which will create the RunOnceEx key and add all the applications to be installed under that key.

Attached File  WSIM.JPG (39.33K)
Number of downloads: 200

2. Here's a sample of the code which will create the RunOnceEx key and add all apps in the registry:

@ ECHO OFF

REG ADD HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RunOnceEx

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

REG ADD %KEY% /V TITLE /D "Installing Applications & Settings" /f



REG ADD %KEY%\005 /VE /D "Mapping Network Drive" /f
REG ADD %KEY%\005 /V 1 /D "NET USE Z: \\myserver\mysharename password /USER:mydomain\domainuser" /f

REG ADD %KEY%\010 /VE /D "Installing Microsoft Office 2007" /f
REG ADD %KEY%\010 /V 1 /D "\\myserver\myshare\Apps\Office07\setup.exe /adminfile Unattended.MSP" /f
REG ADD %KEY%\010 /V 2 /D "\\myserver\myshare\Apps\Capicom\CAPICOM-KB931906-v2102.exe /Q:A /R:N" /f

restart -r

EXIT


3. Add another synchronous command in Pass 7 to AutoLogon as Administrator and this will produce:

Attached File  runonce.JPG (19.49K)
Number of downloads: 167

That's all!

This post has been edited by engert100: 08 September 2009 - 03:00 PM



#2 User is offline   maxXPsoft 

  • MSFN Master
  • Group: Developers
  • Posts: 2,519
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 08 September 2009 - 05:58 PM

In a .cmd file
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "RunOnceEx - Testing Applications" /f
REG ADD %KEY% /v Flags /t REG_DWORD /d "20" /f

REG ADD %KEY%\1003 /VE /D "FileZilla 3.x.x" /f
REG ADD %KEY%\1003 /V 101 /D "CMD /C Start /Wait G:\APPS\FileZilla\Filezilla_autoit.exe" /f
REG ADD %KEY%\1003 /V 102 /D "CMD /C XCOPY \"G:\APPS\FileZilla\*.xml\" \"%USERPROFILE%\AppData\Roaming\FileZilla\" /I /H /R /Y" /f

REG ADD %KEY%\1014 /VE /D "WinRAR 3.90 X64" /f
REG ADD %KEY%\1014 /V 101 /D "CMD /C Start /Wait G:\APPS\Winrar_x64\winrar-x64-390.exe /s" /f
REG ADD %KEY%\1014 /V 102 /D "REGEDIT /S G:\APPS\Winrar_x64\Winrar_x641.reg" /f

rundll32.exe iernonce.dll,RunOnceExProcess
EXIT


Working in Vista 64 bit and in Windows Seven :whistle:

#3 User is offline   iamtheky 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 843
  • Joined: 11-November 08

Posted 08 September 2009 - 06:09 PM

setupcomplete.cmd and FirstLogonCommands supposedly perform similar functions, though the latter has never worked for me. SetupComplete.cmd works beautifully, imo.


http://technet.microsoft.com/en-us/library...314(WS.10).aspx


http://www.msfn.org/...nds-t90863.html

#4 User is offline   engert100 

  • Junior
  • Pip
  • Group: Members
  • Posts: 59
  • Joined: 23-June 08

Posted 10 September 2009 - 09:48 AM

Can FirstLogonCommands and SetupComplete.cmd give you the nice GUI window?

#5 User is offline   iamtheky 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 843
  • Joined: 11-November 08

Posted 10 September 2009 - 10:01 AM

you can put your runonce.cmd lines in the setupcomplete.cmd

so you would still be doing


REG ADD %REGKEY% (with REGKEY being pointed at runonceex)

the cute window is the titles you set, just the same.

This post has been edited by iamtheky: 10 September 2009 - 10:02 AM


#6 User is offline   MAVERICKS CHOICE 

  • The Guy from Aus
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,615
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 10 September 2009 - 02:14 PM

Thanks for the tips.

#7 User is offline   engert100 

  • Junior
  • Pip
  • Group: Members
  • Posts: 59
  • Joined: 23-June 08

Posted 10 September 2009 - 02:50 PM

View Postiamtheky, on Sep 10 2009, 12:01 PM, said:

you can put your runonce.cmd lines in the setupcomplete.cmd

so you would still be doing


REG ADD %REGKEY% (with REGKEY being pointed at runonceex)

the cute window is the titles you set, just the same.


I see. So instead of adding the command line on Step 4 in W.S.I.M. you can add it in setupcomplete.cmd.
Either way works i guess.

My whole point with this thread was the RunOnceEx key which is removed from Vista.
This sucks because runonceEx is really nice in my opinion and there is very little info online about this topic.

I didn't know about setupcomple.cmd though, so thank you about that. I'll keep it in mind.

#8 User is offline   iamtheky 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 843
  • Joined: 11-November 08

Posted 10 September 2009 - 03:04 PM

Runonceex may not be there by default but it works. I think you have to log in as an admin for it to kick off.

-- I'll verify that and get back to you, but I am fairly certain thats how my junk operates.

#9 User is offline   maxXPsoft 

  • MSFN Master
  • Group: Developers
  • Posts: 2,519
  • Joined: 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 11 September 2009 - 08:59 AM

The thing is that MS broke the iernonce.dll for a little while and also quit including the key by default. I copied a iernonce.dll from XP and used it quite awhile with same methods. My example above say's its alive and well in Vista SP2 64 bit and I have used it in Win Seven also.

I use both setupcomplete.cmd and FirstLogonCommands with Vista and Seven with no problems.
Am working on a ver of my app will better handle 64 bit right now.

#10 User is offline   NeilBuc 

  • Group: Members
  • Posts: 1
  • Joined: 15-February 10

Posted 23 July 2010 - 06:51 AM

How did you get the background colour to change when it autologged on and started to process the RunOnceEx reg key?

Mine is black.

Cheers

Neil

View Postengert100, on 08 September 2009 - 02:59 PM, said:

Since there is very little to none information on the web regarding this topic, here are my findings:

How do i get the nice GUI on Vista during app install?

Fact: RunOnceEx key has be removed from Vista Registry

Workaround: Create the Key manually !

1. In W.S.I.M. insert a new Synchronous command in Pass 4 and point to your batch file (which can be either on your network share or locally) which will create the RunOnceEx key and add all the applications to be installed under that key.

Attachment WSIM.JPG

2. Here's a sample of the code which will create the RunOnceEx key and add all apps in the registry:

@ ECHO OFF

REG ADD HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\RunOnceEx

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

REG ADD %KEY% /V TITLE /D "Installing Applications & Settings" /f



REG ADD %KEY%\005 /VE /D "Mapping Network Drive" /f
REG ADD %KEY%\005 /V 1 /D "NET USE Z: \\myserver\mysharename password /USER:mydomain\domainuser" /f

REG ADD %KEY%\010 /VE /D "Installing Microsoft Office 2007" /f
REG ADD %KEY%\010 /V 1 /D "\\myserver\myshare\Apps\Office07\setup.exe /adminfile Unattended.MSP" /f
REG ADD %KEY%\010 /V 2 /D "\\myserver\myshare\Apps\Capicom\CAPICOM-KB931906-v2102.exe /Q:A /R:N" /f

restart -r

EXIT


3. Add another synchronous command in Pass 7 to AutoLogon as Administrator and this will produce:

Attachment runonce.JPG

That's all!


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy