Link to home
Start Free TrialLog in
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
Avatar of alicain
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.
Avatar of ccampbell15

ASKER

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

Regards,
Alastair.
ASKER CERTIFIED SOLUTION
Avatar of Darr247
Darr247
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial