I found the option to install silently from command line (vscode-installer.exe /VERYSILENT
), BUT it still opens automatically at the end of the installation, thus making unattended installation on multiple computers inconvenient.
I checked Inno Setup's documentation (that's what the Visual Studio Code installer uses), but there's nothing related to disabling Visual Studio Code autostart (even on very silent installation).
There might be a way by using /COMPONENTS
, /TASKS
or /MERGETASKS
, but for that I need to know what is already available for use.
Is there a way to make it install completely silently?
There's a hidden task runcode
, that gets automatically selected for silent installations. To unselect the runcode
task, use the /MERGETASKS=!runcode
option.
VSCodeSetup-1.10.1.exe /VERYSILENT /MERGETASKS=!runcode
(Credits for the /MERGETASKS=!runcode
go to @RobertWigley)
The above is based on build/win32/code.iss
in the GitHub repo:
[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
I found to run within Powershell I used Start-Process, Execute-Process seemed to be deprecated for me.
The below is the line I use.
Start-Process -FilePath "path/to/vscode/VSCodeUserSetup-x64.exe" -Argument "/VERYSILENT /MERGETASKS=!runcode"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With