mirror of
https://github.com/reactos/RosBE.git
synced 2024-11-24 11:59:57 +00:00
Changed back to C:\RosBE as default folder. NonAdmin Account users need to set another one.
Tried to simplify WriteEnvStr.nsh a bit. svn path=/trunk/tools/RosBE-Windows/; revision=305
This commit is contained in:
parent
3e97784b92
commit
52caeca6a2
@ -10,7 +10,7 @@
|
||||
;;
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
OutFile "RosBE-${PRODUCT_VERSION}.exe"
|
||||
InstallDir "$PROFILE\RosBE"
|
||||
InstallDir "C:\RosBE"
|
||||
InstallDirRegKey HKCU "${PRODUCT_DIR_REGKEY}" ""
|
||||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
||||
@ -252,7 +252,7 @@ Function CheckAdminOrCurrent
|
||||
Return
|
||||
${else}
|
||||
messageBox MB_OK|MB_ICONEXCLAMATION \
|
||||
"You do not have administrative privileges. Installing on NonAdmin Account is working now, but it's not tested well yet. NO Vista Support possible!"
|
||||
"You do not have administrative privileges. You need to set a folder with writing rights to install your BE and Code to. NO Vista Support possible!"
|
||||
Return
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
@ -26,7 +26,13 @@ Function WriteEnvStr
|
||||
Call IsNT
|
||||
Pop $2
|
||||
${if} $2 == "1"
|
||||
goto WriteEnvStr_NT
|
||||
WriteRegExpandStr ${WriteEnvStr_RegKey} $0 $1
|
||||
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \
|
||||
0 "STR:Environment" /TIMEOUT=5000
|
||||
Pop $2
|
||||
Pop $0
|
||||
Pop $1
|
||||
Return
|
||||
${endif}
|
||||
; Not on NT
|
||||
StrCpy $2 $WINDIR 2 ; Copy drive of windows (c:)
|
||||
@ -35,14 +41,6 @@ Function WriteEnvStr
|
||||
FileWrite $2 "$\r$\nSET $0=$1$\r$\n"
|
||||
FileClose $2
|
||||
SetRebootFlag true
|
||||
Goto WriteEnvStr_done
|
||||
|
||||
WriteEnvStr_NT:
|
||||
WriteRegExpandStr ${WriteEnvStr_RegKey} $0 $1
|
||||
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \
|
||||
0 "STR:Environment" /TIMEOUT=5000
|
||||
|
||||
WriteEnvStr_done:
|
||||
Pop $2
|
||||
Pop $0
|
||||
Pop $1
|
||||
@ -67,7 +65,16 @@ Function un.DeleteEnvStr
|
||||
Call un.IsNT
|
||||
Pop $1
|
||||
${if} $1 == "1"
|
||||
goto DeleteEnvStr_NT
|
||||
DeleteRegValue ${WriteEnvStr_RegKey} $0
|
||||
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \
|
||||
0 "STR:Environment" /TIMEOUT=5000
|
||||
Pop $5
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
Return
|
||||
${endif}
|
||||
; Not on NT
|
||||
StrCpy $1 $WINDIR 2
|
||||
@ -97,14 +104,6 @@ Function un.DeleteEnvStr
|
||||
Delete "$1\autoexec.bat"
|
||||
CopyFiles /SILENT $4 "$1\autoexec.bat"
|
||||
Delete $4
|
||||
Goto DeleteEnvStr_done
|
||||
|
||||
DeleteEnvStr_NT:
|
||||
DeleteRegValue ${WriteEnvStr_RegKey} $0
|
||||
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} \
|
||||
0 "STR:Environment" /TIMEOUT=5000
|
||||
|
||||
DeleteEnvStr_done:
|
||||
Pop $5
|
||||
Pop $4
|
||||
Pop $3
|
||||
|
Loading…
Reference in New Issue
Block a user