Last active
August 30, 2020 07:42
-
-
Save physhster/7f2ee1cbb36e03258401 to your computer and use it in GitHub Desktop.
Install Slack for Windows automatically when a new user logs in.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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