Browse Source

Add allowed app to Controlled Folder Access in Windows installer.

tags/v2.0.4
Andrew Belt 2 years ago
parent
commit
c489e7a138
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      installer.nsi

+ 4
- 0
installer.nsi View File

@@ -107,6 +107,10 @@ Section "${NAME}" INSTALL_SECTION
; Create shortcuts
CreateShortcut "$DESKTOP\${NAME}.lnk" "$INSTDIR\Rack.exe"
CreateShortcut "$SMPROGRAMS\${NAME}.lnk" "$INSTDIR\Rack.exe"

; Add allowed app to Controlled Folder Access
ExpandEnvStrings $0 "%COMSPEC%"
ExecShellWait "" '"$0"' "/C powershell -ExecutionPolicy Bypass -WindowStyle Hidden $\"Add-MpPreference -ControlledFolderAccessAllowedApplications '$INSTDIR\Rack.exe'$\"" SW_HIDE
SectionEnd




Loading…
Cancel
Save