View Single Post
Old 27th June 2012, 10:39   #7
donose.mihai
Junior Member
 
Join Date: Jun 2012
Posts: 6
It is posibble...i've done it!!!

The UAC message is not appearing anymore:

I've used the access control plugin from nsis + i've worked with the registry:

;--------------------------------
; THIS TO WORK REQUIRES TO INSTALL THE ACCESSCONTROL PLUGIN INTO NSIS
; FIND THE PLUGIN IN NET, UNPACK AND COPY THE .dll FILE INTO NSIS PLUGINS FOLDER
;--------------------------------
AccessControl::GrantOnFile "$INSTDIR" "ListDirectory + GenericRead + GenericExecute + GenericWrite + GenericExecute + Delete"
AccessControl::GrantOnFile "$INSTDIR" "(S-1-5-21)" "ListDirectory + GenericRead + GenericExecute + GenericWrite + GenericExecute + Delete"
AccessControl::GrantOnFile "$INSTDIR" "(S-1-1-0)" "ListDirectory + GenericRead + GenericExecute + GenericWrite + GenericExecute + Delete"
AccessControl::GrantOnFile "$INSTDIR" "(S-1-5-32-545)" "ListDirectory + GenericRead + GenericExecute + GenericWrite + GenericExecute + Delete"
AccessControl::GrantOnFile "$INSTDIR" "(Users)" "ListDirectory + GenericRead + GenericExecute + GenericWrite + GenericExecute + Delete"
AccessControl::GrantOnFile "$INSTDIR" "(BU)" "ListDirectory + GenericRead + GenericExecute + GenericWrite + GenericExecute + Delete"
AccessControl::GrantOnRegKey \
HKLM "Software\SoftwareName"" "(BU)" "FullAccess"
AccessControl::GrantOnRegKey \
HKLM "Software\SoftwareName" "(S-1-5-32-545)" "FullAccess"

; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\SoftwareName "Install_Dir" "$INSTDIR"

WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\layers" \
"$NameOfTheExeFile.exe" "RUNASADMIN"
donose.mihai is offline   Reply With Quote