In my application the user must reboot the pc, after the first usage...
What's the best way, to see if the user really did the reboot?!
Printable View
In my application the user must reboot the pc, after the first usage...
What's the best way, to see if the user really did the reboot?!
Well for starters, why do you need the user to reboot?
The application adds a key to registry in the run key, to start with windows.
See this -> My App
That doesn't make any sense. Your app is running so you need the user to reboot so that your app can run? If it's already running what's the point of that? Even if it's another app you want to run, you just put the path in the registry so you know what it is, so why not just call Process.Start to run it? I can't see that there's a need to reboot just to run this app that you can just run anyway.
i'll try to explain...
the application runing in normal use, it's fullscreen and the user can't access anything (start,task,etc)...
But in the first run of the program i need to create the user account, configure the registry with some data, add the autologon, add the autorun, but all this things must be done before the application starts in fullscreen, so i detect if it's the first time the application runs then after all configurations i need that the user restart the system to the application starts like i want.
Solved
Would you mind sharing your solution so that others can get help from this thread in the future?:)
Simple...
I have a folder in registry with all that info of my application, when the configuration phase ends, i create 2 new keys in the registry and one file.
1 - In my application folder create one value (ex. Reboot)
2 - Other in the RunOnce with this command "regedit.exe /s |AppDir|\file_to_remove.reg"
3 - Create in my application folder one file (file_ro_remove.reg) with something like this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\MyAPP]
"Reboot"=-
Then when the windows starts it calls the reg file that deletes the Reboot value in the registry