@@ -372,6 +372,7 @@ Section $(PostgreSQLString) sec1
372
372
; ;;Pop $0 ;"ok" or "error" + error details
373
373
; ;;AccessControl::GrantOnFile "$DATA_DIR" "$loggedInUser" "FullAccess" ;GenericWrite
374
374
; ;;Pop $0 ;"ok" or "error" + error details
375
+ DetailPrint " GRANT FullAccess ON $DATA_DIR TO $loggedInUserShort"
375
376
AccessControl::GrantOnFile " $DATA_DIR" " $loggedInUserShort" " FullAccess"
376
377
Pop $0
377
378
@@ -387,6 +388,7 @@ Section $(PostgreSQLString) sec1
387
388
DetailPrint " Database initialization ..."
388
389
AccessControl::GetCurrentUserName
389
390
Pop $0 ; or "error"
391
+ DetailPrint " GRANT FullAccess ON $DATA_DIR TO $0"
390
392
AccessControl::GrantOnFile " $DATA_DIR" " $0" " FullAccess" ; GenericWrite
391
393
Pop $0 ; "ok" or "error" + error details
392
394
System::Call ' Kernel32::SetEnvironmentVariable(t, t)i ("LC_MESSAGES", "C").r0'
@@ -466,24 +468,33 @@ Section $(PostgreSQLString) sec1
466
468
WriteRegStr HKLM " SYSTEM\CurrentControlSet\Services\$ServiceID_text" " DisplayName" " $ServiceID_text - PostgreSQL Server ${PG_MAJOR_VERSION}"
467
469
WriteRegStr HKLM " SYSTEM\CurrentControlSet\Services\$ServiceID_text" " Description" " Provides relational database storage."
468
470
471
+ DetailPrint " GRANT FullAccess ON $DATA_DIR TO $ServiceAccount_text"
469
472
AccessControl::GrantOnFile " $DATA_DIR" " $ServiceAccount_text" " FullAccess"
470
473
Pop $0 ; "ok" or "error" + error details
474
+ DetailPrint " GRANT FullAccess ON $DATA_DIR TO $loggedInUser"
471
475
AccessControl::GrantOnFile " $DATA_DIR" " $loggedInUser" " FullAccess" ; GenericWrite
472
476
Pop $0 ; "ok" or "error" + error details
477
+ DetailPrint " GRANT FullAccess ON $DATA_DIR TO $loggedInUserShort"
473
478
AccessControl::GrantOnFile " $DATA_DIR" " $loggedInUserShort" " FullAccess" ; GenericWrite
474
479
Pop $0 ; "ok" or "error" + error details
475
480
481
+ DetailPrint " GRANT GenericRead + GenericExecute ON $INSTDIR TO $ServiceAccount_text"
476
482
AccessControl::GrantOnFile " $INSTDIR" " $ServiceAccount_text" " GenericRead + GenericExecute"
477
483
Pop $0 ; "ok" or "error" + error details
478
484
485
+ DetailPrint " GRANT FullAccess ON $DATA_DIR\postgresql.conf TO $ServiceAccount_text"
479
486
AccessControl::GrantOnFile " $DATA_DIR\postgresql.conf" " $ServiceAccount_text" " FullAccess"
480
487
Pop $0 ; "ok" or "error" + error details
488
+ DetailPrint " GRANT FullAccess ON $DATA_DIR\postgresql.conf TO $loggedInUser"
481
489
AccessControl::GrantOnFile " $DATA_DIR\postgresql.conf" " $loggedInUser" " FullAccess" ; "GenericRead + GenericExecute" ;GenericWrite
482
490
Pop $0 ; "ok" or "error" + error details
491
+ DetailPrint " GRANT FullAccess ON $DATA_DIR\postgresql.conf TO $loggedInUserShort"
483
492
AccessControl::GrantOnFile " $DATA_DIR\postgresql.conf" " $loggedInUserShort" " FullAccess" ; GenericWrite
484
493
Pop $0 ; "ok" or "error" + error details
485
494
495
+ DetailPrint " GRANT FullAccess ON $INSTDIR\scripts TO $loggedInUser"
486
496
AccessControl::GrantOnFile " $INSTDIR\scripts" " $loggedInUser" " FullAccess"
497
+ DetailPrint " GRANT GenericRead + GenericExecute ON $INSTDIR\scripts\pgpro_upgrade.cmd TO $loggedInUser"
487
498
AccessControl::GrantOnFile " $INSTDIR\scripts\pgpro_upgrade.cmd" " $loggedInUser" " GenericRead + GenericExecute"
488
499
Pop $0 ; "ok" or "error" + error details
489
500
${if} $isDataDirExist == 1
@@ -559,7 +570,7 @@ Section $(PostgreSQLString) sec1
559
570
WriteRegExpandStr HKLM " SYSTEM\CurrentControlSet\Control\Session Manager\Environment" " PGUSER" " $UserName_text"
560
571
WriteRegExpandStr HKLM " SYSTEM\CurrentControlSet\Control\Session Manager\Environment" " PGPORT" " $TextPort_text"
561
572
WriteRegExpandStr HKLM " SYSTEM\CurrentControlSet\Control\Session Manager\Environment" " PGLOCALEDIR" " $INSTDIR\share\locale\"
562
- AddToPath::AddToPath " $INSTDIR\bin"
573
+ AddToPath::AddToPath " $INSTDIR\bin"
563
574
${endif}
564
575
SectionEnd
565
576
0 commit comments