|
-
Jun 12th, 2006, 04:41 PM
#1
Thread Starter
Member
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???
-
Jun 12th, 2006, 05:57 PM
#2
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
-
Jun 12th, 2006, 06:47 PM
#3
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).
-
Jun 13th, 2006, 10:53 AM
#4
Thread Starter
Member
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.
-
Jun 13th, 2006, 01:26 PM
#5
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...
-
Jun 13th, 2006, 01:51 PM
#6
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|