diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 664f7242..00000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "version": "0.2.0", - "configurations": [ - { - "name": ".NET Core Launch (console)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/DoXM_Client/bin/Debug/netcoreapp2.1/DoXM_Client.dll", - "args": [], - "cwd": "${workspaceFolder}/DoXM_Client", - // For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window - "console": "internalConsole", - "stopAtEntry": false, - "internalConsoleOptions": "openOnSessionStart" - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach", - "processId": "${command:pickProcess}" - } - ,] -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 6d11e5a4..00000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "label": "build", - "command": "dotnet", - "type": "process", - "args": [ - "build", - "${workspaceFolder}/DoXM_Client/DoXM_Client.csproj" - ], - "problemMatcher": "$msCompile" - } - ] -} \ No newline at end of file diff --git a/PostBuildEvents.ps1 b/PostBuildEvents.ps1 new file mode 100644 index 00000000..e69de29b diff --git a/Remotely_Agent/Remotely_Agent.csproj b/Remotely_Agent/Remotely_Agent.csproj index 7c3027ff..871ea656 100644 --- a/Remotely_Agent/Remotely_Agent.csproj +++ b/Remotely_Agent/Remotely_Agent.csproj @@ -21,17 +21,17 @@ - - - - - - - - + + + + + + + + - + diff --git a/Remotely_Desktop.Win/FodyWeavers.xml b/Remotely_Desktop.Win/FodyWeavers.xml index 743daa95..4e68ed1a 100644 --- a/Remotely_Desktop.Win/FodyWeavers.xml +++ b/Remotely_Desktop.Win/FodyWeavers.xml @@ -1,5 +1,4 @@  - \ No newline at end of file diff --git a/Remotely_Desktop.Win/FodyWeavers.xsd b/Remotely_Desktop.Win/FodyWeavers.xsd index 112d3631..2f1b8aae 100644 --- a/Remotely_Desktop.Win/FodyWeavers.xsd +++ b/Remotely_Desktop.Win/FodyWeavers.xsd @@ -33,92 +33,6 @@ - - - - - - A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks - - - - - A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. - - - - - A list of unmanaged 32 bit assembly names to include, delimited with line breaks. - - - - - A list of unmanaged 64 bit assembly names to include, delimited with line breaks. - - - - - The order of preloaded assemblies, delimited with line breaks. - - - - - - This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. - - - - - Controls if .pdbs for reference assemblies are also embedded. - - - - - Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. - - - - - As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. - - - - - Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. - - - - - Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. - - - - - A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | - - - - - A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. - - - - - A list of unmanaged 32 bit assembly names to include, delimited with |. - - - - - A list of unmanaged 64 bit assembly names to include, delimited with |. - - - - - The order of preloaded assemblies, delimited with |. - - - - diff --git a/Remotely_Desktop.Win/Remotely_Desktop.Win.csproj b/Remotely_Desktop.Win/Remotely_Desktop.Win.csproj index c864b330..eae2c14c 100644 --- a/Remotely_Desktop.Win/Remotely_Desktop.Win.csproj +++ b/Remotely_Desktop.Win/Remotely_Desktop.Win.csproj @@ -1,7 +1,6 @@  - Debug @@ -18,6 +17,22 @@ true + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + true AnyCPU @@ -41,13 +56,23 @@ favicon.ico + - app.manifest + 88DA890A3753E3BA4801DC4E4A18A278620970BA + + + Remotely_Desktop.Win_TemporaryKey.pfx + + + false + + + false + + + LocalIntranet - - ..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll - ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll @@ -117,12 +142,13 @@ ResXFileCodeGenerator Resources.Designer.cs - + SettingsSingleFileGenerator Settings.Designer.cs + @@ -147,14 +173,29 @@ Remotely_Shared + + + False + Microsoft .NET Framework 4.7.2 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + + + + \ No newline at end of file diff --git a/Remotely_Desktop.Win/ViewModels/MainWindowViewModel.cs b/Remotely_Desktop.Win/ViewModels/MainWindowViewModel.cs index 08fa9fd6..b0b9bebe 100644 --- a/Remotely_Desktop.Win/ViewModels/MainWindowViewModel.cs +++ b/Remotely_Desktop.Win/ViewModels/MainWindowViewModel.cs @@ -20,6 +20,8 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows; +using System.Security.Principal; +using System.Security.Claims; namespace Remotely_Desktop.Win.ViewModels { @@ -109,6 +111,23 @@ namespace Remotely_Desktop.Win.ViewModels Conductor.SetMessageHandlers(new WinInput()); await Conductor.CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName); await Conductor.CasterSocket.GetSessionID(); + + CheckForAdminRights(); + } + + private void CheckForAdminRights() + { + if (!new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator)) + { + var result = MessageBox.Show("Remotely isn't running with administrator rights. Would you like to re-launch as an admin?", "Run as Admin", MessageBoxButton.YesNo, MessageBoxImage.Question); + if (result == MessageBoxResult.Yes) + { + var psi = new ProcessStartInfo(Assembly.GetExecutingAssembly().Location); + psi.Verb = "RunAs"; + Process.Start(psi); + Environment.Exit(0); + } + } } public void PromptForHostName() diff --git a/Remotely_Desktop.Win/app.manifest b/Remotely_Desktop.Win/app.manifest deleted file mode 100644 index 46d39598..00000000 --- a/Remotely_Desktop.Win/app.manifest +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Remotely_Desktop.Win/packages.config b/Remotely_Desktop.Win/packages.config index 5f0c7813..16ee1f6b 100644 --- a/Remotely_Desktop.Win/packages.config +++ b/Remotely_Desktop.Win/packages.config @@ -1,6 +1,5 @@  - diff --git a/Remotely_ScreenCast.Win/FodyWeavers.xml b/Remotely_ScreenCast.Win/FodyWeavers.xml index a5dcf04f..06ee7216 100644 --- a/Remotely_ScreenCast.Win/FodyWeavers.xml +++ b/Remotely_ScreenCast.Win/FodyWeavers.xml @@ -1,4 +1 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/Remotely_ScreenCast.Win/FodyWeavers.xsd b/Remotely_ScreenCast.Win/FodyWeavers.xsd index 44a53744..b456719b 100644 --- a/Remotely_ScreenCast.Win/FodyWeavers.xsd +++ b/Remotely_ScreenCast.Win/FodyWeavers.xsd @@ -3,94 +3,7 @@ - - - - - - - A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks - - - - - A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. - - - - - A list of unmanaged 32 bit assembly names to include, delimited with line breaks. - - - - - A list of unmanaged 64 bit assembly names to include, delimited with line breaks. - - - - - The order of preloaded assemblies, delimited with line breaks. - - - - - - This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. - - - - - Controls if .pdbs for reference assemblies are also embedded. - - - - - Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. - - - - - As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. - - - - - Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. - - - - - Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. - - - - - A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | - - - - - A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. - - - - - A list of unmanaged 32 bit assembly names to include, delimited with |. - - - - - A list of unmanaged 64 bit assembly names to include, delimited with |. - - - - - The order of preloaded assemblies, delimited with |. - - - - - + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. diff --git a/Remotely_ScreenCast.Win/Remotely_ScreenCast.Win.csproj b/Remotely_ScreenCast.Win/Remotely_ScreenCast.Win.csproj index 33015052..1263552d 100644 --- a/Remotely_ScreenCast.Win/Remotely_ScreenCast.Win.csproj +++ b/Remotely_ScreenCast.Win/Remotely_ScreenCast.Win.csproj @@ -1,6 +1,5 @@  - Debug @@ -38,9 +37,6 @@ true - - ..\packages\Costura.Fody.4.0.0\lib\net40\Costura.dll - ..\packages\MessagePack.1.7.3.7\lib\net47\MessagePack.dll @@ -166,9 +162,6 @@ - - - {b04a1728-2e87-491e-bc7f-f575a1754def} @@ -187,15 +180,7 @@ if $(ConfigurationName) == Debug ( md "$(SolutionDir)Remotely_Agent\bin\Debug\netcoreapp2.2\ScreenCast\" - copy /y "$(TargetPath)" "$(SolutionDir)Remotely_Agent\bin\Debug\netcoreapp2.2\ScreenCast\" + copy /y "$(TargetDir)\*" "$(SolutionDir)Remotely_Agent\bin\Debug\netcoreapp2.2\ScreenCast\" ) - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/Remotely_ScreenCast.Win/packages.config b/Remotely_ScreenCast.Win/packages.config index 293bd79c..14498f1f 100644 --- a/Remotely_ScreenCast.Win/packages.config +++ b/Remotely_ScreenCast.Win/packages.config @@ -1,7 +1,5 @@  - - diff --git a/Remotely_Server/Remotely_Server.csproj b/Remotely_Server/Remotely_Server.csproj index 560d0dbc..8907deaa 100644 --- a/Remotely_Server/Remotely_Server.csproj +++ b/Remotely_Server/Remotely_Server.csproj @@ -58,12 +58,12 @@ - + - + diff --git a/Utilities/Publish.ps1 b/Utilities/Publish.ps1 index 0273e45d..b9163983 100644 --- a/Utilities/Publish.ps1 +++ b/Utilities/Publish.ps1 @@ -78,12 +78,12 @@ Move-Item -Path "$PublishDir\Remotely_Desktop.Unix.zip" -Destination "$Root\Remo # Copy .NET Framework ScreenCaster to Agent output folder. if ((Test-Path -Path ".\Remotely_ScreenCast.Win\bin\Release\Remotely_ScreenCast.exe") -eq $true) { - Copy-Item -Path ".\Remotely_ScreenCast.Win\bin\Release\Remotely_ScreenCast.exe" -Destination ".\Remotely_Agent\bin\Release\netcoreapp2.2\win10-x64\publish\ScreenCast\Remotely_ScreenCast.exe" -Force - Copy-Item -Path ".\Remotely_ScreenCast.Win\bin\Release\Remotely_ScreenCast.exe" -Destination ".\Remotely_Agent\bin\Release\netcoreapp2.2\win10-x86\publish\ScreenCast\Remotely_ScreenCast.exe" -Force + Copy-Item -Path ".\Remotely_ScreenCast.Win\bin\Release\" -Destination ".\Remotely_Agent\bin\Release\netcoreapp2.2\win10-x64\publish\ScreenCast\" -Force -Recurse + Copy-Item -Path ".\Remotely_ScreenCast.Win\bin\Release\" -Destination ".\Remotely_Agent\bin\Release\netcoreapp2.2\win10-x86\publish\ScreenCast\" -Force -Recurse } elseif ((Test-Path -Path ".\Remotely_ScreenCast.Win\bin\Debug\Remotely_ScreenCast.exe") -eq $true) { - Copy-Item -Path ".\Remotely_ScreenCast.Win\bin\Debug\Remotely_ScreenCast.exe" -Destination ".\Remotely_Agent\bin\Release\netcoreapp2.2\win10-x64\publish\ScreenCast\Remotely_ScreenCast.exe" -Force - Copy-Item -Path ".\Remotely_ScreenCast.Win\bin\Debug\Remotely_ScreenCast.exe" -Destination ".\Remotely_Agent\bin\Release\netcoreapp2.2\win10-x86\publish\ScreenCast\Remotely_ScreenCast.exe" -Force + Copy-Item -Path ".\Remotely_ScreenCast.Win\bin\Debug\" -Destination ".\Remotely_Agent\bin\Release\netcoreapp2.2\win10-x64\publish\ScreenCast\" -Force -Recurse + Copy-Item -Path ".\Remotely_ScreenCast.Win\bin\Debug\" -Destination ".\Remotely_Agent\bin\Release\netcoreapp2.2\win10-x86\publish\ScreenCast\" -Force -Recurse }