Results 1 to 8 of 8

Thread: [RESOLVED] [2005] - Reboot Check

  1. #1

    Thread Starter
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Resolved [RESOLVED] [2005] - Reboot Check

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

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [2005] - Reboot Check

    Well for starters, why do you need the user to reboot?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: [2005] - Reboot Check

    The application adds a key to registry in the run key, to start with windows.

    See this -> My App

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005] - Reboot Check

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: [2005] - Reboot Check

    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.

  6. #6

    Thread Starter
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: [2005] - Reboot Check

    Solved

  7. #7
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [RESOLVED] [2005] - Reboot Check

    Would you mind sharing your solution so that others can get help from this thread in the future?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  8. #8

    Thread Starter
    Frenzied Member mickey_pt's Avatar
    Join Date
    Sep 2006
    Location
    Corner of the Europe :)
    Posts
    1,959

    Re: [RESOLVED] [2005] - Reboot Check

    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
    Last edited by mickey_pt; Sep 9th, 2007 at 10:10 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width