How to easily install Visual Studio code (without opening automatically when installation is complete)?

I found the installation option without vscode-installer.exe/VERYSILENTfrom the command line ( vscode-installer.exe/VERYSILENT), BUT it still opens automatically at the end of the installation, which makes automatic installation on several computers inconvenient.

I checked the Inno Setup documentation (which uses the Visual Studio Code Installer), but there was nothing to disable the autostart of Visual Studio code (even with a very quiet installation).

There may be a way using /COMPONENTS, /TASKS /MERGETASKSor /MERGETASKS, but for this I need to know what is already available for use.

Is there a way to make it install completely silently?

+6
source share
3 answers

There is a hidden runcodetask that is automatically selected for automatic installation. To cancel runcodetasks runcode, use the option . /MERGETASKS=!runcode

VSCodeSetup-1.10.1.exe /VERYSILENT /MERGETASKS=!runcode

(Credits for /MERGETASKS=!runcodego to @RobertWigley)


build/win32/code.issbased on on github: build/win32/code.iss build/win32/code.iss

[Tasks]
Name: "runcode"; Description: "{cm:RunAfter,{#NameShort}}"; \
    GroupDescription: "{cm:Other}"; Check: WizardSilent

[Run]
Filename: "{app}\{#ExeBasename}.exe"; \
    Description: "{cm:LaunchProgram,{#NameLong}}"; Tasks: runcode; \
    Flags: nowait postinstall; Check: ShouldRunAfterUpdate
Filename: "{app}\{#ExeBasename}.exe"; \
    Description: "{cm:LaunchProgram,{#NameLong}}"; \
    Flags: nowait postinstall; Check: WizardNotSilent
+9
source

Run -Path "VSCodeUserSetup-x64-1.30.1.exe" -Parameters "/ VERYSILENT / CLOSEAPPLICATIONS

You can use this to install PowerShell.

0
source

, Powershell Start-Process, Execute-Process .

, .

Start-Process -FilePath "path/to/vscode/VSCodeUserSetup-x64.exe" -Argument "/VERYSILENT /MERGETASKS=!runcode"
0

Source: https://habr.com/ru/post/1671369/


All Articles