浏览代码

GRASS-Installer.nsi.tmpl: sync with trunk regarding g.mkfontcap run during standalone installation

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@66294 15284696-431f-4ddb-bdfa-cd5b030d7da7
Helmut Kudrnovsky 9 年之前
父节点
当前提交
2068b6b7d2
共有 1 个文件被更改,包括 12 次插入3 次删除
  1. 12 3
      mswindows/GRASS-Installer.nsi.tmpl

+ 12 - 3
mswindows/GRASS-Installer.nsi.tmpl

@@ -528,8 +528,14 @@ Section "GRASS" SecGRASS
 	SetOutPath "$INSTALL_DIR"
 	File /r ${PACKAGE_FOLDER}\*.*
 
-	;grant modifying/overwriting fontcap file
-	AccessControl::GrantOnFile "$INSTDIR\etc\fontcap" "(BU)" "GenericRead + GenericWrite + Delete"	
+	;grant $INSTDIR\etc read write accessible and show if succeeded: error if it failed
+	AccessControl::GrantOnFile "$INSTDIR\etc" "(S-1-5-32-545)" "FullAccess"
+	Pop $R0
+	DetailPrint $R0	
+	;grant modifying/overwriting fontcap file and show if succeeded: error if it failed	
+	AccessControl::GrantOnFile "$INSTDIR\etc\fontcap" "(S-1-5-32-545)" "FullAccess"
+	Pop $R0
+	DetailPrint $R0	
 	
 	;create run_gmkfontcap.bat
 	ClearErrors
@@ -579,7 +585,7 @@ Section "GRASS" SecGRASS
 	FileWrite $0 '    <security>$\r$\n'
 	FileWrite $0 '      <requestedPrivileges>$\r$\n'
 	FileWrite $0 '        <requestedExecutionLevel$\r$\n'
-	FileWrite $0 '          level="asInvoker"$\r$\n'
+	FileWrite $0 '          level="requireAdministrator"$\r$\n'
 	FileWrite $0 '          uiAccess="false"/>$\r$\n'
 	FileWrite $0 '        </requestedPrivileges>$\r$\n'
 	FileWrite $0 '       </security>$\r$\n'
@@ -590,6 +596,9 @@ Section "GRASS" SecGRASS
 	
 	;Run g.mkfontcap outside a grass session during installation to catch all fonts
 	ExecWait '"$INSTALL_DIR\etc\run_gmkfontcap.bat"'
+
+	;set $INSTDIR\etc back to read accessible
+	AccessControl::SetOnFile "$INSTDIR\etc" "(S-1-5-32-545)" "GenericRead + GenericExecute"	
 	
 	;Install demolocation into the GIS_DATABASE directory
 	SetOutPath "$GIS_DATABASE\demolocation"