Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Prompting a Reboot on a fresh installer and on update only if a perticular file is changed
 

Prompting a Reboot on a fresh installer and on update only if a perticular file is changed

hello,

i have a MSI setup which installs some files. i need to promt for the reboot if it is a fresh installation.
if i run a upgrade installation then the decision to show reboot promt should be taken only if a perticular file is changed. say (1.0.0.0 to 2.0.0.0)

i understand that i need to add a custom action. but what would be the conditions for it. i am not sure.

regards
deep
ksharma_deepak  Sunday, September 20, 2009 6:07 AM

Hello Deep,

Thanks for your post on MSDN forum.

The ScheduleReboot Action(Standard action) will the user for a restart of the system at the end of the installation. To use this standard action, you need to use add this action to the InstallExecuteSequence Table.

In your case, you want to fire this action if the installation is a fresh installation or a upgrade installation to version 2.0.0.0. Therefore you can set the condition for the ScheduleRebootaction to (PREVIOUSVERSIONSINSTALLED) AND (ProductVersion="2.0.0.0") OR (NOT Installed). You can use Orca to add the following row to InstallExecuteSequence Table.

Action: ScheduleReboot
Condition: (PREVIOUSVERSIONSINSTALLED) AND (ProductVersion="2.0.0.0") OR (NOT Installed)
Sequence: 6560

More info
http://msdn.microsoft.com/en-us/library/aa371527%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/aa369500%28VS.85%29.aspx
http://support.microsoft.com/kb/255905

Thanks,
Rong-Chun Zhang
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Rong-Chun Zhang  Monday, September 21, 2009 11:02 AM

Hello Deep,

Thanks for your post on MSDN forum.

The ScheduleReboot Action(Standard action) will the user for a restart of the system at the end of the installation. To use this standard action, you need to use add this action to the InstallExecuteSequence Table.

In your case, you want to fire this action if the installation is a fresh installation or a upgrade installation to version 2.0.0.0. Therefore you can set the condition for the ScheduleRebootaction to (PREVIOUSVERSIONSINSTALLED) AND (ProductVersion="2.0.0.0") OR (NOT Installed). You can use Orca to add the following row to InstallExecuteSequence Table.

Action: ScheduleReboot
Condition: (PREVIOUSVERSIONSINSTALLED) AND (ProductVersion="2.0.0.0") OR (NOT Installed)
Sequence: 6560

More info
http://msdn.microsoft.com/en-us/library/aa371527%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/aa369500%28VS.85%29.aspx
http://support.microsoft.com/kb/255905

Thanks,
Rong-Chun Zhang
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Rong-Chun Zhang  Monday, September 21, 2009 11:02 AM

Hello Deep,

I am writing to check the status of the issue on your side. Would you mind letting me know the result of the suggestions? If you have any additional question, welcome to post here.

Have a great day!

Thanks,
Rong-Chun Zhang
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com


Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Rong-Chun Zhang  Wednesday, September 23, 2009 8:49 AM

hello Rong,

the issue is fixed now. we tried you suggestion and it worked. we also found that we have one propertly "UninstallPreviousversion" to true.
which was causing the problem.

thanks for your support!
regards

ksharma_deepak  Monday, October 05, 2009 5:31 AM

You can use google to search for other answers

Custom Search

More Threads

• how to add more than one setup programs in a single setup file using c#
• Unable to install application from other machine using click once
• Visual Styles not working with Embedded Control in IE
• install dot net set up in windows 1998 o.s?
• not valid installation package
• Application cannot be started error
• Including fonts with install
• Disabling clickonce when a deployment project is being used
• How do i set the deployment providor from within the project? One Click
• How to Clear the Activex deployed Cab