Avatar of ccampbell15
ccampbell15 asked on

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

Thanks
Lee
Windows OS

Avatar of undefined
Last Comment
Darr247

8/22/2022 - Mon
alicain

Hi!

How about using the Startup folder?  Details here : http://windows.microsoft.com/en-gb/windows-vista/run-a-program-automatically-when-windows-starts
Regards,
Alastair.
ASKER
ccampbell15

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?
alicain

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

Regards,
Alastair.
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER CERTIFIED SOLUTION
Darr247

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question