diff --git a/Installer/Language/czech.nsi b/Installer/Language/czech.nsi index 4178fcb39..bead3e706 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} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG." \ No newline at end of file diff --git a/Installer/Language/dutch.nsi b/Installer/Language/dutch.nsi index fbe1b3299..e0c91895f 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} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG." \ No newline at end of file diff --git a/Installer/Language/english.nsi b/Installer/Language/english.nsi index 3ed459db0..ba5ecd705 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} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG." \ No newline at end of file diff --git a/Installer/Language/french.nsi b/Installer/Language/french.nsi index 9dc05ac66..e54a5f1ea 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} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG." \ No newline at end of file diff --git a/Installer/Language/german.nsi b/Installer/Language/german.nsi index ecb757631..bbc7a9b46 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} "Sie müssen Mitglied der Grupper 'Power Users' or 'Administratoren' sein, damit Sie mRemoteNG installieren können." \ No newline at end of file diff --git a/Installer/Language/polish.nsi b/Installer/Language/polish.nsi index 6cfaa89f9..a3c1213a5 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} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG." \ No newline at end of file diff --git a/Installer/Language/spanish.nsi b/Installer/Language/spanish.nsi index cd2ecb5ca..a9497c4a0 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} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG." \ No newline at end of file diff --git a/Installer/mRemote.nsi b/Installer/mRemote.nsi index 6276a02a0..111770e87 100644 --- a/Installer/mRemote.nsi +++ b/Installer/mRemote.nsi @@ -61,6 +61,41 @@ 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". + StrCmp $1 "Admin" 0 +3 + Goto doit + StrCmp $1 "Power" 0 +3 + Goto doit + 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 +144,8 @@ FunctionEnd Section "" ; Install SetOutPath $INSTDIR - + SetShellVarContext all + ; AddFiles File /r /x "mRemoteNG.vshost.*" "..\mRemoteV1\bin\Release\*.*" File /r "Dependencies\*.*" @@ -150,6 +186,11 @@ Section "un.Uninstall" RMDIR /r $INSTDIR ; Start Menu + SetShellVarContext all + Delete "$SMPROGRAMS\mRemoteNG\mRemoteNG.lnk" + Delete "$SMPROGRAMS\mRemoteNG\Uninstall.lnk" + RMDir "$SMPROGRAMS\mRemoteNG" + SetShellVarContext current Delete "$SMPROGRAMS\mRemoteNG\mRemoteNG.lnk" Delete "$SMPROGRAMS\mRemoteNG\Uninstall.lnk" RMDir "$SMPROGRAMS\mRemoteNG" diff --git a/mRemoteV1/App/App.Info.vb b/mRemoteV1/App/App.Info.vb index 5b898675b..d804e3e75 100644 --- a/mRemoteV1/App/App.Info.vb +++ b/mRemoteV1/App/App.Info.vb @@ -15,7 +15,7 @@ Namespace App Public Class Settings #If Not PORTABLE Then - Public Shared ReadOnly SettingsPath As String = GetFolderPath(SpecialFolder.LocalApplicationData) & "\" & My.Application.Info.ProductName + Public Shared ReadOnly SettingsPath As String = GetFolderPath(SpecialFolder.ApplicationData) & "\" & My.Application.Info.ProductName #Else Public Shared ReadOnly SettingsPath As String = My.Application.Info.DirectoryPath #End If diff --git a/mRemoteV1/App/App.Runtime.vb b/mRemoteV1/App/App.Runtime.vb index 081cf0edc..836270ac7 100644 --- a/mRemoteV1/App/App.Runtime.vb +++ b/mRemoteV1/App/App.Runtime.vb @@ -4,6 +4,7 @@ Imports Crownwood Imports System.Threading Imports System.Xml Imports mRemoteNG.App.Native +Imports System.Environment Namespace App Public Class Runtime @@ -788,6 +789,22 @@ Namespace App End If End If + ' LocalApplicationData to ApplicationData move if needed + Dim oldPath As String = GetFolderPath(SpecialFolder.LocalApplicationData) & "\" & My.Application.Info.ProductName + Dim newPath As String = App.Info.Connections.DefaultConnectionsPath + Dim dirinfonew As IO.DirectoryInfo + dirinfonew = New IO.DirectoryInfo(newPath) + If (Not dirinfonew.Exists) Then + Dim dirinfoold As IO.DirectoryInfo + dirinfoold = New IO.DirectoryInfo(oldPath) + If (dirinfoold.Exists) Then + MkDir(dirinfonew.FullName) + For Each fileInfo As FileInfo In dirinfoold.GetFiles + File.Move(fileInfo.FullName, Path.Combine(newPath, fileInfo.Name)) + Next + End If + End If + If File.Exists(conL.ConnectionFileName) = False Then If WithDialog Then mC.AddMessage(Messages.MessageClass.WarningMsg, String.Format(My.Resources.strConnectionsFileCouldNotBeLoaded, conL.ConnectionFileName)) diff --git a/mRemoteV1/My Project/Settings.Designer.vb b/mRemoteV1/My Project/Settings.Designer.vb index ee7231c36..3445f4dcc 100644 --- a/mRemoteV1/My Project/Settings.Designer.vb +++ b/mRemoteV1/My Project/Settings.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' Dieser Code wurde von einem Tool generiert. -' Laufzeitversion:2.0.50727.4952 +' Laufzeitversion:2.0.50727.5444 ' ' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn ' der Code erneut generiert wird. @@ -1950,22 +1950,28 @@ Namespace My End Set End Property - _ - Public ReadOnly Property ConDefaultRDGatewayUsageMethod() As String + Public Property ConDefaultRDGatewayUsageMethod() As String Get Return CType(Me("ConDefaultRDGatewayUsageMethod"),String) End Get + Set + Me("ConDefaultRDGatewayUsageMethod") = value + End Set End Property - _ - Public ReadOnly Property ConDefaultRDGatewayUseConnectionCredentials() As String + Public Property ConDefaultRDGatewayUseConnectionCredentials() As String Get Return CType(Me("ConDefaultRDGatewayUseConnectionCredentials"),String) End Get + Set + Me("ConDefaultRDGatewayUseConnectionCredentials") = value + End Set End Property False - + Never - + Yes diff --git a/mRemoteV1/Notes/Misc.txt b/mRemoteV1/Notes/Misc.txt index 047b8840f..fb25d9a60 100644 --- a/mRemoteV1/Notes/Misc.txt +++ b/mRemoteV1/Notes/Misc.txt @@ -4,7 +4,7 @@ How to build the portable package: to Inherits PortableSettingsProvider In App.Info.Settings: change SettingsPath - from GetFolderPath(SpecialFolder.LocalApplicationData) & "\" & My.Application.Info.CompanyName.Replace(" ", "_") & "\" & My.Application.Info.ProductName + from GetFolderPath(SpecialFolder.ApplicationData) & "\" & My.Application.Info.CompanyName.Replace(" ", "_") & "\" & My.Application.Info.ProductName to My.Application.Info.DirectoryPath How to add a new language: diff --git a/mRemoteV1/app.config b/mRemoteV1/app.config index 542ed8989..82c54f14f 100644 --- a/mRemoteV1/app.config +++ b/mRemoteV1/app.config @@ -5,9 +5,6 @@
- -
- @@ -497,6 +494,12 @@ False + + Never + + + Yes + mRemoteNG @@ -523,14 +526,4 @@ - - - - Never - - - Yes - - -