Skip to content

Instantly share code, notes, and snippets.

@physhster
Last active August 30, 2020 07:42
Show Gist options
  • Save physhster/7f2ee1cbb36e03258401 to your computer and use it in GitHub Desktop.
Save physhster/7f2ee1cbb36e03258401 to your computer and use it in GitHub Desktop.
Install Slack for Windows automatically when a new user logs in.
@echo off
:make somewhat hidden MyCompany directory
mkdir C:\ProgramData\MyCompany\
:copy Slack Installer
copy \\myshare.mycompany.com\Applications\Slack\SlackSetup.exe C:\ProgramData\MyCompany\
:load default registry hive for all new users
REG LOAD HKU\TEMP "C:\Users\Default\NTUSER.DAT"
:add required RunOnce value
REG ADD HKU\TEMP\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v Slack /t REG_SZ /d "C:\ProgramData\MyCompany\SlackSetup.exe -s" /f
:unload hive
REG UNLOAD HKU\TEMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment