Jump to content

RunOnceEx Flags not working


Recommended Posts

I'm using the following inf in order to install my additional components:

[Version]
Signature = "$WINDOWS NT$"

[Extras.Prepare]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx",,0x00000012
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx",Flags,0x00010001,0x00000080
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\00",1,,"rundll32 setupapi,InstallHinfSection Extras.Add 128 ..\Windows\Inf\RunOnceX.inf"

[Extras.Add]
AddReg = Extras.Tasks

[Extras.Tasks]
HKLM,"%RunOnceEx%",Title,0,"Instalando componentes"
HKLM,"%RunOnceEx%",Flags,0x00010001,0x00000020
HKLM,"%RunOnceEx%\01",,,".NET Framework 1.1 (SP1)"
HKLM,"%RunOnceEx%\01",1,,"%1%\DOTNETFX\SETUP.EXE /q"
HKLM,"%RunOnceEx%\01",2,,"%1%\DOTNETFX\LANGPACK_ESN.EXE /q"
HKLM,"%RunOnceEx%\02",,,"Windows Messenger 5.1"
HKLM,"%RunOnceEx%\02",1,,"%11%\msiexec /i %1%\I386\messenger.msi /q"

[Strings]
RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"

The problem is that the Title key only works at T-13 mark, not at the first logon. At first logon, Windows ALWAYS show the "Windows Update" caption in the RunOnceEx box, whatever the title had set.

Also, I tried to add the Title reg key in the Extra.Prepare and Extra.Tasks sections and didn't work. Perhaps the key is deleted by Windows at first logon... Why? and how to fix this?

Installation is OK. The apps will install at first logon.

Using Windows XP (SP2 integrated + Hotfixes) on VMware 5.

Thanks for your help :)

Link to comment
Share on other sites


I was gonna reply to this, but not having the time to test it right now, I can only speculate.

I'm guessing you import the Prepare section at T-12. After your first login, I can see 2 scenerios. The first is that it processes the first entry, goes on with life, and adds the next entries for next login. In doing so, it may delete old entries, and the title may be one of them.

The next scenario would be it processes the first entry, and then goes onto the next one you just imported. Since it would be after 00, it would logically go onto the next step, thus not rendering the title properly.

Until I can get some time to test this, I can't answer you. You could always fill me in on what is going on. Have you tried moving the title section up to the Prepare section? Also why don't you use the RunonceEX variable in that section as well? You can remove the flags key if you are using XP, as that stopped working in 2000.

Link to comment
Share on other sites

Hi, thanks for your reply :rolleyes:

I'm guessing you import the Prepare section at T-12.
No, I'm importing the Prepare section when text-mode setup finishes, specifically in TXTSETUP.SIF:

[HiveInfs.Fresh]
AddReg = RunOnceX.inf,Extras.Prepare

How can I import the Inf settings at T-12? (I'm interested in it, too). Keep in mind I'm not using batch files, only Infs...

When Setup arises the T-13 mark the Extras.Add section is added to the Registry. Therefore, tasks are executed at first login.

If I add the Title key to the Extras.Prepare Section, title is properly shown in THIS dialog box, but not in the next one (first login). The Title key is always ignored when user logs on the first time... Why this?

Have you tried moving the title section up to the Prepare section?

Yes. See above.

Also why don't you use the RunonceEX variable in that section as well?
Because I'm importing the Inf settings in text-mode setup, and on this stage, Setup doesn't recognize variable expansion (as Gosh' tutorial claims). It would be interesting know how to import the Inf settings the first time at GUI-mode setup...

I could use variable expansion without problems.

You can remove the flags key if you are using XP, as that stopped working in 2000.

Not entirely. Flag controlling if dialog box (RunOnceEx) appears or not, works. I'm using the 0x00000080 flag the first time to hide the importing process to the user. I want to show the RunOnceEx dialog only when *really* installing the apps. Other flags controlling log creation don't work (you're right at this point).

Again, thanks for your valuable help. Waiting for your next response :thumbup

Link to comment
Share on other sites

I understand what you are doing now.

Have you tried placing it in the RunOnce section instead? This would hide any window, and I wouldn't see a conflict arising with the RunOnceEx section.

As for the T-12, I was assuming you were doing this in command lines, but I can see why you are doing it the way you are. What you could also try is through sysoc.inf, as this should give similar results.

Link to comment
Share on other sites

What you could also try is through sysoc.inf, as this should give similar results.
Can you explain in more detail how to do this?
Have you tried placing it in the RunOnce section instead? This would hide any window, and I wouldn't see a conflict arising with the RunOnceEx section.

Can you put a little sample?

Thanks very much :hello:

Link to comment
Share on other sites

What you could also try is through sysoc.inf, as this should give similar results.

Can you explain in more detail how to do this?

Since you like gosh's tutorials, you can check his.

here

here2

You can also check RyanVM's update pack, he does the same in there.

Can you put a little sample?

I would assume this would work for your next question

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","mommy",,"rundll32 setupapi,InstallHinfSection Extras.Add 128 ..\Windows\Inf\RunOnceX.inf"

Link to comment
Share on other sites

Finally... I got it! I explain how to achieve this for other people :yes:

I did the following:

RunOnceX.inf

[Version]
Signature = "$WINDOWS NT$"

[AddExtras]
AddReg = Tasks

[Tasks]
HKLM,"%RunOnceEx%",Title,0,"Instalando componentes"
HKLM,"%RunOnceEx%\01",,,".NET Framework 1.1 Repack (SP1)"
HKLM,"%RunOnceEx%\01",1,,"%1%\DOTNETFX\SETUP.EXE /qb"
HKLM,"%RunOnceEx%\01",2,,"%1%\DOTNETFX\LANGPACK_ESN.EXE /qb"
HKLM,"%RunOnceEx%\02",,,"Windows Messenger 5.1"
HKLM,"%RunOnceEx%\02",1,,"%1%\I386\messenger.msi /qb"

[Strings]
RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"

WINNT.SIF

[Data]
UnattendedInstall = Yes
MsDosInitiated    = 0

[Unattended]
UnattendedMode = GuiAttended
OemSkipEula    = Yes
WaitForReboot  = No

[Branding]
BrandIEUsingUnattended = Yes

[URL]
Home_Page   = http://www.google.es
Search_Page = http://www.google.es

[FavoritesEx]
; Don't make any Microsoft-related favorite.

[Components]
; Don't install old Windows Messenger.
msmsgs      = Off
; Don't install MSN Explorer.
msnexplr    = Off
; Don't install local games.
freecell    = Off
hearts      = Off
minesweeper = Off
pinball     = Off
solitaire   = Off
spider      = Off
; Don't install Internet games.
zonegames   = Off

[SetupParams]
; Prepare extras setup (they will be installed when user logs on for the first time).
UserExecute = "rundll32 setupapi,InstallHinfSection AddExtras 128 %windir%\inf\RunOnceX.inf"

As you can see, I'm using the UserExecute instruction to import the RunOnceX.inf in order to install the apps after first login. This instruction is executed at T-9, and all the keys being imported are kept after installation, including the Title key :)

Also, I can using variable expansion, making my installation more flexible... (it works, verified).

Now, 2 last questions:

1) I'm using only Unattended setup in text-mode, but -in GUI mode- Setup doesn't offer to the user the dialog to install network clients and protocols... What I should add (to WINNT.SIF) in order to do this? Note I want to install clients and protocols MANUALLY, not automatically (unattended). I tried to add the [Networking] section but no go :no:

2) How can I install an MSI file showing the basic interface but without Cancel button? I tried /qb and /qr, but they didn't work (Cancel button is always shown).

Thanks very much, for all your valuable help. This forum rocks! :thumbup

EDIT: Corrected wrong information in question 1.

Edited by ponghy
Link to comment
Share on other sites

2) How can I install an MSI file showing the basic interface but without Cancel button? I tried /qb and /qr, but they didn't work (Cancel button is always shown).

You might try /qb-

No guarantee, but I think I remember this from a previous post.

-ebaysuks

Link to comment
Share on other sites

OK. Question 1 solved. I had a little typo in WINNT.SIF:

UnattendedMode = GuiAttended -> UnattendMode = GuiAttended

But, what about 2nd question? Is it impossible to hide the Cancel button while showing the installation progress?

Thanks for your help (again) :rolleyes:

Link to comment
Share on other sites

Yzöwl: Thanks for your input :) But, I want to show the progress bar without Cancel button. And:

/q = /qn

Tried /qb, /qb-. They didn't work as expected (still showing the Cancel button).

Any ideas guys? :(

Link to comment
Share on other sites

/qb! is the switch you're looking for. If calling the MSI itself doesn't recognize the switch use

msiexec.exe /i %PATHTOMSI%\some.msi /qb!

/qb! is an internal Windows Installer switch so it should be recognized.

What it could be, is that you don't have Windows Installer 2.0 installed. XP SP1 and up should have it though.

And for reference: http://msdn.microsoft.com/library/default....ine_options.asp

Edited by Alanoll
Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...