diff --git a/Installer/Language/czech.nsi b/Installer/Language/czech.nsi index 4178fcb39..79644f57c 100644 --- a/Installer/Language/czech.nsi +++ b/Installer/Language/czech.nsi @@ -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." \ No newline at end of file +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!" \ No newline at end of file diff --git a/Installer/Language/dutch.nsi b/Installer/Language/dutch.nsi index fbe1b3299..46f925fe4 100644 --- a/Installer/Language/dutch.nsi +++ b/Installer/Language/dutch.nsi @@ -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." \ No newline at end of file +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!" \ No newline at end of file diff --git a/Installer/Language/english.nsi b/Installer/Language/english.nsi index 3ed459db0..2cebeff07 100644 --- a/Installer/Language/english.nsi +++ b/Installer/Language/english.nsi @@ -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." \ No newline at end of file +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!" \ No newline at end of file diff --git a/Installer/Language/french.nsi b/Installer/Language/french.nsi index 9dc05ac66..d42608af1 100644 --- a/Installer/Language/french.nsi +++ b/Installer/Language/french.nsi @@ -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." \ No newline at end of file +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!" \ No newline at end of file diff --git a/Installer/Language/german.nsi b/Installer/Language/german.nsi index ecb757631..07f396038 100644 --- a/Installer/Language/german.nsi +++ b/Installer/Language/german.nsi @@ -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." \ No newline at end of file +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!" \ No newline at end of file diff --git a/Installer/Language/polish.nsi b/Installer/Language/polish.nsi index 6cfaa89f9..0fffa7e4d 100644 --- a/Installer/Language/polish.nsi +++ b/Installer/Language/polish.nsi @@ -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." \ No newline at end of file +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!" \ No newline at end of file diff --git a/Installer/Language/spanish.nsi b/Installer/Language/spanish.nsi index cd2ecb5ca..237e49c09 100644 --- a/Installer/Language/spanish.nsi +++ b/Installer/Language/spanish.nsi @@ -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." \ No newline at end of file +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!" \ No newline at end of file diff --git a/Installer/mRemote.nsi b/Installer/mRemote.nsi index 6276a02a0..9c9d4abfa 100644 --- a/Installer/mRemote.nsi +++ b/Installer/mRemote.nsi @@ -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} @@ -109,7 +146,8 @@ FunctionEnd Section "" ; Install SetOutPath $INSTDIR - + SetShellVarContext all + ; AddFiles File /r /x "mRemoteNG.vshost.*" "..\mRemoteV1\bin\Release\*.*" File /r "Dependencies\*.*"