Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 800851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:21:09+00:00 2026-05-14T23:21:09+00:00

I am creating a setup project using Visual Studio. I want to reboot the

  • 0

I am creating a setup project using Visual Studio. I want to reboot the system after the installation completed successfully.

I want it one time effort. I do not want to modify the setup each time using any external tool/ utility before delivering it to client.

Can I tweak the setup project itself?

How Can I do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:21:09+00:00Added an answer on May 14, 2026 at 11:21 pm

    Please dont swhoot me down, but Im not going to answer your specific question, however this is a way to reboot PC after an msi install.

    Use WiX instead, it is so much more flexible the the VS built in setup, and there is a plugin for VS.

    If you do use WiX this is the code that initiates a reboot.

    <InstallExecuteSequence>
      <ScheduleReboot After='InstallFinalize' />
    </InstallExecuteSequence>
    

    Alternatively you could create a transform for your VS setup project that only contains the additional entries to initiate the reboot, then anytime you build your project all you need do is apply the transform, you could ship this to customers in a batch file or similar.

    ps bear in mind that issuing a shell command as a custom action is not the best way to do it. This will cause the machine to reboot and not return the proper exit code 3010 so if someone is trying to trap the exit code or do a /norestart on the command line the shell command will ignore this.

    EDIT
    Once you have created a msi file open it up with orca and then add the necessary changes to the tables to schedulereboot. Save the changes as a transform then as long as the msi file doesnt change dramatically you can simply apply the transform to the msi everytime you run it.

    Personaly I wouldnt want to do this as it is an extra step and you ought to be able to do it in the source.

    To add the reboot sequence in orca goto the InstallExecuteSequence table and find the InstallFinalize entry. Add a new entry called ScheduleReboot and enter a number in the sequence column that is 1 greater than the sequence from the InstallFinalize stage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 401k
  • Answers 401k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Join users table twice with different aliases. First join to… May 15, 2026 at 4:34 am
  • Editorial Team
    Editorial Team added an answer sed -ni '/ER GW/ b end; p; d; :end $p;… May 15, 2026 at 4:34 am
  • Editorial Team
    Editorial Team added an answer Jimmy is right. When you reload a page, the browser… May 15, 2026 at 4:34 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.