This tag denotes question regarding RunOnce feature of Windows system - a specific branch of Windows Registry, where developers and application installers put paths to programs that should be executed only once. After successful execution, such entry is removed from Windows Registry. This feature is useful for example for finishing uninstall process, where after next reboot of computer, a special "clenaup" program is run once to delete locked files.
Questions tagged [runonce]
41 questions
9
votes
7 answers
How to run my program on before logout on windows XP?
I am looking for an inverse version of "RunOnceEx".
RunOnceEx does run some program, before the user's shell(desktop&taskbar) start. The login progress will not continue before the runonceex complete.
I want to do exact the same but on user…

Dennis C
- 24,511
- 12
- 71
- 99
8
votes
3 answers
Uninstalling a driver via batch file
I'm looking for information on whether or not there is a Windows standard way for accomplishing this?
Essentially we have a vendor who has updated their driver and devices running our software must be updated automatically.
In order to do this, we…

tronious
- 1,547
- 2
- 28
- 45
6
votes
1 answer
What's the order of Windows startup?
I'm curious to know the order of Windows startup during a user login. Does anyone know?
Basically, my application was being invoked by login script that a GPO calls. While 3rd party EXE was being invoked, it was failing to start.
Then, through trial…

Jose Leon
- 1,615
- 3
- 22
- 30
5
votes
4 answers
How to run a powershell script in runonce-Key?
I have a call to powershell.exe that looks like this, and which works from my commandline:
powershell.exe -noexit -command " & 'C:\Test\test.ps1' "
However, when I enter that entry exactly that way in the runonce-key of my current user, nothing…

Erik
- 2,316
- 9
- 36
- 58
3
votes
2 answers
Why can't I make a RunOnce entry in the Windows Registry using TRegistry and Delphi?
I am using the following code to try to make a RunOnce entry:
program RunOnceTest;
{$APPTYPE CONSOLE}
uses
SysUtils, Registry, Windows;
var
R: TRegistry;
begin
try
WriteLn('Testing RunOnStartup.......');
R := TRegistry.Create;
…

Nick Hodges
- 16,902
- 11
- 68
- 130
3
votes
2 answers
RunOnce to rename a Computername with a random name on reboot
We are a learning center and sometimes we are not able to sysprep the machines for different reasons. When I do not sysprep the machines, I end up cloning a machine 25 times with the same computername.
I then have to go manually on each station and…

Menkadelic
- 79
- 2
- 7
3
votes
1 answer
Limitations of runonce in windows
I have added the following command to the runonce registry to run a specific python script on start up with a long list of parameters as follows
HKLU..."fio-test"=C:\Python26\python.exe…

Rusty Weber
- 1,541
- 1
- 19
- 32
2
votes
1 answer
NSIS $TEMP Has Different Value
I have been noticed $TEMP param has different value when you:
run the installer.exe manually (by double clicking)
run from Application with Admin rights.
Running manually will result $TEMP = C:/Users/username/AppData/Local/Temp
Running from App…

undo
- 31
- 3
2
votes
1 answer
How to execute RunOnce for a specific user on Windows 7?
I know that I can set a runonce key in the Win7 registry globally, which will be executed no matter which user logs on the next time, using this registry key:
HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
I need to do an initialization…

Erik
- 2,316
- 9
- 36
- 58
1
vote
1 answer
Application run using RunOnce registry key does not start when logged in using Enter-PSSession
I am trying to run calc app using RunOnce registry key(HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce). When the machine is restarted and I login using Enter-PSSession remotely with appropriate credentials, when I check the…

Yamadev
- 11
- 1
1
vote
2 answers
Windows Installer is invoking the RunOnce key immediately
In my MSI installer package I have a custom action which adds a RunOnce key. However, it surprised me to observe that, at the end of the install, the RunOnce key is invoked immediately (and then deleted), whereas I was anticipating this to occur…

AndrewK
- 31
- 2
1
vote
1 answer
why icons in bootstrap change only once on collapse ?why jquery code run only once?
i hav a used accordian and collapse classes from bootstrap and have added font awesome icons to the card headings.and using jquery i changes icons to up arrows and down arrows using collapse events..all of it worked fine but only once the icon…

fathima k
- 11
- 1
1
vote
2 answers
Where is the recommended folder to temporary store an EXE needed for a Runonce process
During software installation I need to have some code run after the next restart. To do this I am placing a link to the EXE under this registry key:
Software\Microsoft\Windows\CurrentVersion\RunOnce
My question is, where should I put the EXE…

Nick
- 11
- 1
1
vote
1 answer
Set RunOnce for every user
I have an application that contains some dlls and 3 exes. I need to set an exe as RunOnce for every user. If a new user is created then the exe should run on first login of that user also. How can I set RunOnce for each user. I am using VS2015 and…

Nelson T Joseph
- 2,683
- 8
- 39
- 56
1
vote
1 answer
How do I run a batch file once in Office 2013
I am trying to have a batch file run once when Office is started. I opened the following key and inserted it in there but I am obviously not invoking the right command.
HKCU\Software\Microsoft\Office\15.0\FirstRun
I am inserting the item as…

Jeff Tran
- 33
- 3