Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 17th September 2015, 07:41   #1
hellik
Junior Member
 
Join Date: Mar 2010
Posts: 14
setting permissions:

https://trac.osgeo.org/grass/browser....nsi.tmpl#L531

;grant $INSTDIR\etc read write accessible
AccessControl::GrantOnFile "$INSTDIR\etc" "(S-1-5-32-545)" "GenericRead + GenericWrite"
;grant modifying/overwriting fontcap file
AccessControl::GrantOnFile "$INSTDIR\etc\fontcap" "(S-1-5-32-545)" "GenericRead + GenericWrite + Delete"

the unfortunate situation is that the whole procedure works on some windows boxes and on some windows boxes not.

Process Monitor or a manually invoking of the bat file shows access denied.
hellik is offline   Reply With Quote
Old 17th September 2015, 12:24   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
Quote:
Originally Posted by hellik View Post
the unfortunate situation is that the whole procedure works on some windows boxes and on some windows boxes not.
Are some of these 64-bit and some 32-bit versions of Windows?

You should also check if AccessControl failed:

Quote:
AccessControl::GrantOnFile ...
Pop $R0
DetailPrint $R0 ; Will be "error" if it failed
You could also try granting FullAccess, you are currently missing GenericExecute when trying to be specific...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 17th September 2015, 20:28   #3
hellik
Junior Member
 
Join Date: Mar 2010
Posts: 14
> Are some of these 64-bit and some 32-bit versions of Windows?

it works for me for win 7 32-bit and 64-bit; users reported that it doesn't work for win 8/win 10 64-bit.

> You should also check if AccessControl failed:

added it to the nsis script, waiting for the daily build of the installer and report back

> You could also try granting FullAccess

will try it
hellik is offline   Reply With Quote
Old 22nd September 2015, 16:05   #4
hellik
Junior Member
 
Join Date: Mar 2010
Posts: 14
a short update on this after some testing.

> You could also try granting FullAccess
> You should also check if AccessControl failed

I've added to the script granting FullAccess to folder "$INSTDIR\etc" and file which should be updated and a check of failing/success AccessControl [1].

furthermore I've elevated the bat file, which is called by the installer, to administrator by adding elevation to the bat manifest [2].

test report:

- setting AccessControl ok and file is updated:

win Vista 32bit
win 7 32bit and 64bit
win 8.1 64bit

- setting AccessControl ok, but file is not updated:

win 10 64bit in a virtual machine

[1] https://trac.osgeo.org/grass/browser....nsi.tmpl#L531
[2] https://trac.osgeo.org/grass/browser....nsi.tmpl#L588
hellik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump