Skip to content

Commit

Permalink
Fixed Instlaller - Links for all users.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Rehm committed Apr 30, 2011
1 parent 83b7f11 commit 9cb33c4
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 8 deletions.
5 changes: 4 additions & 1 deletion Installer/Language/czech.nsi
Expand Up @@ -10,4 +10,7 @@ LangString InstallerLanguage ${LANG_CZECH} "Installer Language"
LangString SelectInstallerLanguage ${LANG_CZECH} "Please select the language of the installer"

; Requires .NET Framework
LangString RequiresNetFramework ${LANG_CZECH} "mRemoteNG requires Microsoft .NET Framework 2.0."
LangString RequiresNetFramework ${LANG_CZECH} "mRemoteNG requires Microsoft .NET Framework 2.0."

; User needs to be Admin
LangString RequiresAdminUser ${LANG_CZECH} "mRemoteNG needs to be installed as admin - otherwise it will be installed for this user only!"
5 changes: 4 additions & 1 deletion Installer/Language/dutch.nsi
Expand Up @@ -10,4 +10,7 @@ LangString InstallerLanguage ${LANG_DUTCH} "Installer Language"
LangString SelectInstallerLanguage ${LANG_DUTCH} "Please select the language of the installer"

; Requires .NET Framework
LangString RequiresNetFramework ${LANG_DUTCH} "mRemoteNG requires Microsoft .NET Framework 2.0."
LangString RequiresNetFramework ${LANG_DUTCH} "mRemoteNG requires Microsoft .NET Framework 2.0."

; User needs to be Admin
LangString RequiresAdminUser ${LANG_DUTCH} "mRemoteNG needs to be installed as admin - otherwise it will be installed for this user only!"
5 changes: 4 additions & 1 deletion Installer/Language/english.nsi
Expand Up @@ -10,4 +10,7 @@ LangString InstallerLanguage ${LANG_ENGLISH} "Installer Language"
LangString SelectInstallerLanguage ${LANG_ENGLISH} "Please select the language of the installer"

; Requires .NET Framework
LangString RequiresNetFramework ${LANG_ENGLISH} "mRemoteNG requires Microsoft .NET Framework 2.0."
LangString RequiresNetFramework ${LANG_ENGLISH} "mRemoteNG requires Microsoft .NET Framework 2.0."

; User needs to be Admin
LangString RequiresAdminUser ${LANG_ENGLISH} "mRemoteNG needs to be installed as admin - otherwise it will be installed for this user only!"
5 changes: 4 additions & 1 deletion Installer/Language/french.nsi
Expand Up @@ -10,4 +10,7 @@ LangString InstallerLanguage ${LANG_FRENCH} "Installer Language"
LangString SelectInstallerLanguage ${LANG_FRENCH} "Please select the language of the installer"

; Requires .NET Framework
LangString RequiresNetFramework ${LANG_FRENCH} "mRemoteNG requires Microsoft .NET Framework 2.0."
LangString RequiresNetFramework ${LANG_FRENCH} "mRemoteNG requires Microsoft .NET Framework 2.0."

; User needs to be Admin
LangString RequiresAdminUser ${LANG_FRENCH} "mRemoteNG needs to be installed as admin - otherwise it will be installed for this user only!"
5 changes: 4 additions & 1 deletion Installer/Language/german.nsi
Expand Up @@ -10,4 +10,7 @@ LangString InstallerLanguage ${LANG_GERMAN} "Installationsprogamm Sprache"
LangString SelectInstallerLanguage ${LANG_GERMAN} "Bitte wählen Sie die Sprache für das Installationsprogramm"

; Requires .NET Framework
LangString RequiresNetFramework ${LANG_GERMAN} "mRemoteNG benötigt das Microsoft .NET Framework 2.0."
LangString RequiresNetFramework ${LANG_GERMAN} "mRemoteNG benötigt das Microsoft .NET Framework 2.0."

; User needs to be Admin
LangString RequiresAdminUser ${LANG_GERMAN} "mRemoteNG muss als Administrator installiert werden, sonst wird es nur für diesen Benutzer installiert!"
5 changes: 4 additions & 1 deletion Installer/Language/polish.nsi
Expand Up @@ -10,4 +10,7 @@ LangString InstallerLanguage ${LANG_POLISH} "Installer Language"
LangString SelectInstallerLanguage ${LANG_POLISH} "Please select the language of the installer"

; Requires .NET Framework
LangString RequiresNetFramework ${LANG_POLISH} "mRemoteNG requires Microsoft .NET Framework 2.0."
LangString RequiresNetFramework ${LANG_POLISH} "mRemoteNG requires Microsoft .NET Framework 2.0."

; User needs to be Admin
LangString RequiresAdminUser ${LANG_POLISH} "mRemoteNG needs to be installed as admin - otherwise it will be installed for this user only!"
5 changes: 4 additions & 1 deletion Installer/Language/spanish.nsi
Expand Up @@ -10,4 +10,7 @@ LangString InstallerLanguage ${LANG_SPANISH} "Installer Language"
LangString SelectInstallerLanguage ${LANG_SPANISH} "Please select the language of the installer"

; Requires .NET Framework
LangString RequiresNetFramework ${LANG_SPANISH} "mRemoteNG requires Microsoft .NET Framework 2.0."
LangString RequiresNetFramework ${LANG_SPANISH} "mRemoteNG requires Microsoft .NET Framework 2.0."

; User needs to be Admin
LangString RequiresAdminUser ${LANG_SPANISH} "mRemoteNG needs to be installed as admin - otherwise it will be installed for this user only!"
40 changes: 39 additions & 1 deletion Installer/mRemote.nsi
Expand Up @@ -61,6 +61,43 @@ VIAddVersionKey "FileVersion" ${PRODUCT_VERSION_LONG}
!define MUI_FINISHPAGE_RUN_Text "$(LaunchMremoteNow)"

Function .onInit
ClearErrors
UserInfo::GetName
IfErrors Win9x
Pop $0
UserInfo::GetAccountType
Pop $1
# GetOriginalAccountType will check the tokens of the original user of the
# current thread/process. If the user tokens were elevated or limited for
# this process, GetOriginalAccountType will return the non-restricted
# account type.
# On Vista with UAC, for example, this is not the same value when running
# with `RequestExecutionLevel user`. GetOriginalAccountType will return
# "admin" while GetAccountType will return "user".
UserInfo::GetOriginalAccountType
Pop $2
StrCmp $1 "Admin" 0 +3
Goto doit
StrCmp $1 "Power" 0 +3
Goto noop
StrCmp $1 "User" 0 +3
Goto noop
StrCmp $1 "Guest" 0 +3
Goto noop
MessageBox MB_OK "Unknown error"
Goto doit

Win9x:
doit:
# We can install
Call SelectLanguage
Goto end
noop:
MessageBox MB_OK "$(RequiresAdminUser)"
end:
FunctionEnd

Function SelectLanguage
;Language selection dialog
Push ""
Push ${LANG_ENGLISH}
Expand Down Expand Up @@ -109,7 +146,8 @@ FunctionEnd

Section "" ; Install
SetOutPath $INSTDIR

SetShellVarContext all

; AddFiles
File /r /x "mRemoteNG.vshost.*" "..\mRemoteV1\bin\Release\*.*"
File /r "Dependencies\*.*"
Expand Down

0 comments on commit 9cb33c4

Please sign in to comment.