question

AvinashMundhe-0675 avatar image
0 Votes"
AvinashMundhe-0675 asked ·

How can run RunOnce / active setup in windows more than once?

In Actual Implementation sometimes client give us the package with same version number, they don’t change the package version, even if it is upgrade, they don’t the package to be upgraded with the version number. The same version exist on the client machine. We do uninstall and install. Even if we uninstall, active setup doesn’t uninstall, we have to do something for it. So at that we need this that what we have to do so that it runs once again?(run, runonce)

Under which condition Run works and under which condition it doesn’t work? Just like RunOnce runs only once why not 2nd time?what does it check? If I want to manually the run the RunOnce 2nd times So what changes we will do registry so that it will run again one time manually?for that which value we have to change in registry.

How can we run active setup second time manually?

windows-10-general
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TeemoTang-MSFT avatar image
0 Votes"
TeemoTang-MSFT answered ·

Run: command runs every time
Runonce: command runs one time and the registry is then removed
Active setup: runs one time per user logging in, can be configured to run once again by increasing the version value
Run and RunOnce Registry Keys
https://docs.microsoft.com/en-us/windows/win32/setupapi/run-and-runonce-registry-keys
We cannot run RunOnce / active setup in windows two times.
Check this case for more information
Need Active Setup to run on every logon
https://www.itninja.com/question/need-active-setup-to-run-on-every-logon


If the Answer is helpful, please click "Accept Answer" and upvote it.
Information posted in the given link is hosted by a third party. Microsoft does not guarantee the accuracy and effectiveness of information.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for ans, sir


U told one point that we can increase version in HKCU to run it once again on logon.
Can we do anything like this in case of RunOnce to run it again??

The thing is my mentor has asked these questions so answer for following questions should surely exist:


Under which condition Run works and under which condition it doesn’t work? Just like RunOnce runs only once why not 2nd time?what does it check? If I want to manually the run the RunOnce 2nd times So what changes we will do registry so that it will run again one time manually?

Hint given by my mentor: version proprty in run and runonce
I could get anything regarding this on google. If u have anything regarding this plz provide

How can we run active setup second time manually?

0 Votes 0 ·
TeemoTang-MSFT avatar image
0 Votes"
TeemoTang-MSFT answered ·

No, we can’t do anything to make RunOnce run again.

The Run key is processed after every logon, either by the Explorer shell, if it is present, or by First Boot Agent (FBA), if a custom shell, Command shell, or Task Manager shell is used. If FBA processes this key, it does so after every logon, not during first boot as it normally would. Typically, this flag is used to load Systray applications, launch services in executables, hide autostart applications, or hide background processes.

The RunOnce key is processed only once, by FBA, after Plug and Play device enumeration and DLL registration processing have completed. The values of this registry key are deleted from the registry after it is processed, so that it will not run again. Typically, this flag is used when a reboot is required, such as for a DLL or OCX registration, or for cleaning up a setup or an uninstall.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.