Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Run Windows Installer in background

Run Windows Installer in background

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpc++dotnethelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Peter Nirschl
    wrote on last edited by
    #1

    Hello everyone! I'm not quite sure, if this is the correct message board for this thread, but i'm working with C++ so I posted this thread here. I've created an Win32 Application, which checks if the .net Framework is installed on the system. If not, the program will automatically start to install the .net Framework in the background. Is there any way to run a Windows Installer Package in the background (command line, etc.)?? For example I have myinstaller.msi or dotnetfx.exe! How can I solve my problem??? Thank you for helping me!

    B 1 Reply Last reply
    0
    • P Peter Nirschl

      Hello everyone! I'm not quite sure, if this is the correct message board for this thread, but i'm working with C++ so I posted this thread here. I've created an Win32 Application, which checks if the .net Framework is installed on the system. If not, the program will automatically start to install the .net Framework in the background. Is there any way to run a Windows Installer Package in the background (command line, etc.)?? For example I have myinstaller.msi or dotnetfx.exe! How can I solve my problem??? Thank you for helping me!

      B Offline
      B Offline
      Blake Miller
      wrote on last edited by
      #2

      You can execute the EXE file with CreatePRocess() and either wait for it to finish or not. You can run MSIEXEC to run MSI files. You can wait, or not, for the setup to finish. Now, I have not installed .NET so many times to know if it usually requires a reboot or not. If it usually requires a reboot, then you might as well launch its setup and exit, since the machine will probably have to be restarted anyway.

      P 1 Reply Last reply
      0
      • B Blake Miller

        You can execute the EXE file with CreatePRocess() and either wait for it to finish or not. You can run MSIEXEC to run MSI files. You can wait, or not, for the setup to finish. Now, I have not installed .NET so many times to know if it usually requires a reboot or not. If it usually requires a reboot, then you might as well launch its setup and exit, since the machine will probably have to be restarted anyway.

        P Offline
        P Offline
        Peter Nirschl
        wrote on last edited by
        #3

        Thank you for the tip! I understand the MSIEXEC. Blake Miller wrote: CreatePRocess() :confused::confused::confused: But that's the thing I don't understand. I'm just a newbie, so could you give me a few lines of code, please?!?! :-O

        B 1 Reply Last reply
        0
        • P Peter Nirschl

          Thank you for the tip! I understand the MSIEXEC. Blake Miller wrote: CreatePRocess() :confused::confused::confused: But that's the thing I don't understand. I'm just a newbie, so could you give me a few lines of code, please?!?! :-O

          B Offline
          B Offline
          Blake Miller
          wrote on last edited by
          #4

          Check out this article on starting another program from your current program: http://www.codeproject.com/threads/CreateProcessEx.asp You need to call CreateProcess to start the MSIEXEC program which will run the MSI file you use to install .NET

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups