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. Windows Forms
  4. run NSIS installer.exe from commandline

run NSIS installer.exe from commandline

Scheduled Pinned Locked Moved Windows Forms
tutorialquestion
2 Posts 2 Posters 3 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.
  • C Offline
    C Offline
    chandni_chandrakant_maheta
    wrote on last edited by
    #1

    I have an installer.exe. That installer is built in NSIS V2.17. I need to run that installer in silent mode from command line. My coding is as below: char regSvrPath1[1024]; strcpy(regSvrPath1, "C:\\Program Files\\Installer.exe"); char regSvrArg1[1024]; strcpy(regSvrArg1, " /S /D=C:\\Program Files\\Installer"); int iI = _spawnl(_P_WAIT, regSvrPath1, regSvrArg1, NULL); When the spawnl statement is executed, it shows me the messagebox, "Please specify the installation type as first parameter: /install /upgrade /remove" I have tried out the arguments as strcpy(regSvrArg1, " /install /S /D=C:\\Program Files\\Installer"); But it is not working.... Can any one please guide me, how to specify install, uninstall or upgrade option from command line??

    T 1 Reply Last reply
    0
    • C chandni_chandrakant_maheta

      I have an installer.exe. That installer is built in NSIS V2.17. I need to run that installer in silent mode from command line. My coding is as below: char regSvrPath1[1024]; strcpy(regSvrPath1, "C:\\Program Files\\Installer.exe"); char regSvrArg1[1024]; strcpy(regSvrArg1, " /S /D=C:\\Program Files\\Installer"); int iI = _spawnl(_P_WAIT, regSvrPath1, regSvrArg1, NULL); When the spawnl statement is executed, it shows me the messagebox, "Please specify the installation type as first parameter: /install /upgrade /remove" I have tried out the arguments as strcpy(regSvrArg1, " /install /S /D=C:\\Program Files\\Installer"); But it is not working.... Can any one please guide me, how to specify install, uninstall or upgrade option from command line??

      T Offline
      T Offline
      Thisita
      wrote on last edited by
      #2

      - I do beleive you should run the installer with a /S for silent mode. example: myinstaller.exe /S -If this has changed with a new version check your nsis manual PS: You migh also have to add an IsSilent() check in your install script

      "Shorter of breath, and one day closer to death." ~Pink Floyd

      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