Jump to content
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. ×

RunOnceEx only executes manually

Recommended Posts

I was just about to post the following when I realized my mistake. I had used HKCU instead of HKLM (although I am sure I specifically double checked this).

EDIT: I forgot to change the topic to something like 'HowTo execute RunOnceEx in HKCU', but I only see how to edit the content of my posting.

I have encountered an interesting problem with RunOnceEx, about which I did not find anything specific in the forums. Those post all seem to deal with failures to create the RunOnceEx entries at all T13 or to autologon.

I successfully import the RunOnceEx settings in cmdlines.txt as described in


using the following (stripped down) cmd file:

cmdow @ /HID
@echo off

set KEY=HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "Performing Post Install Operations" /f

REG ADD %KEY%\005 /VE /D "Setting Up Shortcuts" /f
REG ADD %KEY%\005 /V 1 /D "cmd.exe" /f


The entries are created, which I verify using regedit, but at no point are they executed, in particular not upon first logon after reboot or during the automatic logon of the administrator at the end of the installation process (which, by the way, works fine). RunOnce entries are executed without any problems.

When calling

rundll32.exe iernonce.dll,RunOnceExProcess

as described in the guide, RunOnceEx executes perfectly, so my guess is that the registry entries are correct.

But why aren't they executed automatically? I did nothing to disable any processes (and RunOnceEx has worked before).

Is this maybe a known problem with an obvious solution to someone?

Thanks in advance.

I still decided to post this, because I find it very interesting to know, that the DLL function, when being called manually, also executes a RunOnceEx within HKCU. So for people wanting to use the visual apperance of the RunOnceEx installation window and at the same time customize it for a specific user, this might be of interest. After all, RunOnce doesn't create any window, but it could be used to trigger the execution of a HKCU RunOnceEx.

If you do not consider this helpful/interesting or it is well known and I just didn't find it, please delete the thread.

Link to post
Share on other sites

Yes I am sure. The RunOnceEx entries are created from cmdlines.txt. And as I found out, everything works perfectly after all. I merely wanted to point out a (womewhat strange) additional feature in connection with RunOnceEx.

Actually, you can regard this behavior as completely separate from the unattended installation process. The latter only automatizes the creation of the registry entries. The behavior I described has only to do with the RunOnceEx service.

Why are you asking?

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...