Results 1 to 6 of 6

Thread: Install Project - Reboot

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    61

    Install Project - Reboot

    I have created an install project for my application and need to have the PC reboot after the install is complete (user must be allowed to choose to reboot now or later). Anyone know how to do this???

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Install Project - Reboot

    If your setup needs the user to reboot, it'll prompt him/her to do it.
    It's up to MSI to decide whether system needs to reboot or not, not you
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Install Project - Reboot

    Why would the system need to reboot anyway? The only time that is needed is when you're installing a driver that needs to be initialized before everything else (if it's something like a USB device it shouldn't need to reboot) or if you're doing an update/replace of major system file(s).
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  4. #4

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    61

    Re: Install Project - Reboot

    Well the install needs to reboot because we have found issues when environment variables are set Windows does not always make them available. We have noticed if we reboot manually after every install the applications are able to get at the environment variables.

  5. #5
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Install Project - Reboot

    What version(s) of windows have you had this issue with and how are you setting up the environment vars? With my experimentation with install GCC and other components, I was constantly changing the environment variables and never had an issue where I had to restart before I could use them.

    The issue could be something else...
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  6. #6

    Thread Starter
    Member
    Join Date
    Jun 2005
    Posts
    61

    Re: Install Project - Reboot

    I am using a custom action when the install is finished and adding the values to the registy. The OS is Win2k.

    (Ya I know this is C# code so no one has to tell me.)

    Code:
    RegistryKey envKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Session Manager\\Environment", true);
    
    //Add the new environment variables.
    //
    envKey.SetValue("VAR1","Value1");
    envKey.SetValue("VAR2","Value2");
    envKey.SetValue("DIR", this.Context.Parameters["TargetDir"].ToString());
    envKey.Close();

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