Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
InnoSetup installer script to generate a "package" that resets a local account password on Windows (intended for use with SCCM)
; Basic information
AppName = Computer Maintenance
AppVerName = Computer Maintenance 0.0.1
AppPublisher = Neil Sabol
AppVersion = 0.0.1
Compression = lzma
SolidCompression = yes
PrivilegesRequired = admin
; Choose a benign directory to "install" even though we are not really
; installing anything - this "installer" will just run 2 commands
DefaultDirName = {win}\Temp
; Tidy up the name and location of the generated installer (current
; user's Desktop)
; Do not allow selection of an alternative install location and do not
; prompt for a Start menu location
; Do not create an uninstaller or add an entry to Apps (Programs
; and Features)
Uninstallable = no
CreateUninstallRegKey = no
; Reset the password administrator password with "net user ..."
Filename: "net.exe"; Parameters: "user administrator MyNewPassword2018"; Flags: shellexec waituntilterminated runhidden; StatusMsg: Performing maintenance
; Add a registry value that can be used in a detection rule (in SCCM)
; so the "install" status is traceable
Filename: "reg.exe"; Parameters: "add ""HKLM\SOFTWARE\Computer Maintenance"" /v ""Status"" /t REG_DWORD /d 201812 /f /REG:64"; Flags: shellexec waituntilterminated runhidden; StatusMsg: Capturing status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.