runonce runs before explorer

Hi all,

I have an app I installed that needs a reboot and then I would like to call it at the first reboot.

When I use HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce to pop the pathname to my app it comes up OK but it comes up before explore.exe.

I need explorer runnning for so the user can drag some folders over to the app GUI.

Any way to make runonce (or some similar method) happen AFTER explorer.exe is running?
I even tried putting %windir\explorer.exe in runonce before the app but it still did not come up

Who is Participating?
Darr247Connect With a Mentor Commented:
> I even tried putting %windir\explorer.exe in runonce
Unless you actually meant you tried %windir%\explorer.exe that wouldn't have worked anyway, plus there is no guarantee they will run in the order you put them.

Did you try
instead? That doesn't run until after the user logs on... explorer should be loaded by then.

Also, remember the runonce command is usually deleted *prior* to actually running... you can change that by putting an exclamation point (!) before the Value name... if it has an exclamation point before the name, it won't be deleted until the runonce operation has reported completion.

How about using the Startup folder?  Details here :
ccampbell15Author Commented:
I thought about that but then I need to determine if it's XP, Vista/Win 7 or Win 8
Is there a cmd to return the OS?
You can query the registry to determine that :

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion CurrentVersion

Valid values are :

Operating system        Version number
-----------------       --------------
Windows 8                   6.2
Windows Server 2012         6.2
Windows 7                   6.1
Windows Server 2008 R2      6.1
Windows Server 2008         6.0
Windows Vista               6.0
Windows Server 2003 R2      5.2
Windows Server 2003         5.2
Windows XP 64-Bit Edition   5.2
Windows XP                  5.1
Windows 2000                5.0

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.