Skip to content

Commit 083649e

Browse files
committed
No longer require administrator rights!
Fixes annoying Task Scheduler startup task issues, and turns out there was no reason to use admin rights.
1 parent 96ba1b0 commit 083649e

File tree

12 files changed

+354
-56
lines changed

12 files changed

+354
-56
lines changed
805 KB
Binary file not shown.
0 Bytes
Binary file not shown.

Advanced Installer/Advanced Installer.aip

Lines changed: 276 additions & 21 deletions
Large diffs are not rendered by default.

Advanced Installer/Advanced Installer.aiproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
</LoadFromTemplate>
1818
</PropertyGroup>
1919
<PropertyGroup Condition=" '$(Configuration)' == 'DefaultBuild' " />
20+
<PropertyGroup Condition=" '$(Configuration)' == 'All' " />
21+
<PropertyGroup Condition=" '$(Configuration)' == 'Build_MSIX_APPX' " />
2022
<ItemGroup>
2123
<Compile Include="Advanced Installer.aip">
2224
<SubType>Code</SubType>

AssistantComputerControl/App.config

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
9696
<dependentAssembly>
9797
<assemblyIdentity name="System.Runtime.InteropServices.RuntimeInformation" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
98-
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
98+
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
9999
</dependentAssembly>
100100
<dependentAssembly>
101101
<assemblyIdentity name="Sentry.Protocol" publicKeyToken="fba2ec45388e2af0" culture="neutral" />
@@ -105,6 +105,14 @@
105105
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
106106
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
107107
</dependentAssembly>
108+
<dependentAssembly>
109+
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
110+
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
111+
</dependentAssembly>
112+
<dependentAssembly>
113+
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
114+
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
115+
</dependentAssembly>
108116
</assemblyBinding>
109117
</runtime>
110118
</configuration>

AssistantComputerControl/AssistantComputerControl.csproj

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,51 +98,81 @@
9898
<DelaySign>false</DelaySign>
9999
</PropertyGroup>
100100
<ItemGroup>
101-
<Reference Include="Microsoft.Win32.TaskScheduler, Version=2.8.20.0, Culture=neutral, PublicKeyToken=c416bc1b32d97233, processorArchitecture=MSIL">
102-
<HintPath>..\packages\TaskScheduler.2.8.20\lib\net452\Microsoft.Win32.TaskScheduler.dll</HintPath>
101+
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
102+
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
103+
</Reference>
104+
<Reference Include="Microsoft.Win32.TaskScheduler, Version=2.9.2.0, Culture=neutral, PublicKeyToken=e25603a88b3aa7da, processorArchitecture=MSIL">
105+
<HintPath>..\packages\TaskScheduler.2.9.2\lib\net452\Microsoft.Win32.TaskScheduler.dll</HintPath>
103106
</Reference>
104107
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
105108
<HintPath>..\packages\Microsoft.WindowsAPICodePack.Core.1.1.0\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
106109
</Reference>
107110
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
108111
<HintPath>..\packages\Microsoft.WindowsAPICodePack.Shell.1.1.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
109112
</Reference>
110-
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
111-
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
113+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
114+
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
112115
</Reference>
113116
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
114-
<HintPath>..\packages\NLog.4.6.8\lib\net45\NLog.dll</HintPath>
117+
<HintPath>..\packages\NLog.4.7.13\lib\net45\NLog.dll</HintPath>
115118
</Reference>
116119
<Reference Include="PresentationCore" />
117120
<Reference Include="PresentationFramework" />
118-
<Reference Include="Sentry, Version=1.1.2.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
119-
<HintPath>..\packages\Sentry.1.1.2\lib\net461\Sentry.dll</HintPath>
121+
<Reference Include="Sentry, Version=3.12.1.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
122+
<HintPath>..\packages\Sentry.3.12.1\lib\net461\Sentry.dll</HintPath>
120123
</Reference>
121-
<Reference Include="Sentry.PlatformAbstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
122-
<HintPath>..\packages\Sentry.PlatformAbstractions.1.0.0\lib\net45\Sentry.PlatformAbstractions.dll</HintPath>
124+
<Reference Include="Sentry.PlatformAbstractions, Version=1.1.1.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
125+
<HintPath>..\packages\Sentry.PlatformAbstractions.1.1.1\lib\net45\Sentry.PlatformAbstractions.dll</HintPath>
123126
</Reference>
124-
<Reference Include="Sentry.Protocol, Version=1.0.4.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
125-
<HintPath>..\packages\Sentry.Protocol.1.0.4\lib\net46\Sentry.Protocol.dll</HintPath>
127+
<Reference Include="Sentry.Protocol, Version=2.1.8.0, Culture=neutral, PublicKeyToken=fba2ec45388e2af0, processorArchitecture=MSIL">
128+
<HintPath>..\packages\Sentry.Protocol.2.1.8\lib\net46\Sentry.Protocol.dll</HintPath>
126129
</Reference>
127130
<Reference Include="System" />
128-
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
129-
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll</HintPath>
131+
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
132+
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
133+
</Reference>
134+
<Reference Include="System.Collections.Immutable, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
135+
<HintPath>..\packages\System.Collections.Immutable.6.0.0\lib\net461\System.Collections.Immutable.dll</HintPath>
130136
</Reference>
131137
<Reference Include="System.configuration" />
132138
<Reference Include="System.Configuration.Install" />
133139
<Reference Include="System.Core" />
134140
<Reference Include="System.DirectoryServices" />
135141
<Reference Include="System.Drawing" />
136142
<Reference Include="System.IO.Compression, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
143+
<Reference Include="System.Management" />
144+
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
145+
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
146+
</Reference>
137147
<Reference Include="System.Messaging" />
148+
<Reference Include="System.Numerics" />
149+
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
150+
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
151+
</Reference>
152+
<Reference Include="System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
153+
<HintPath>..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll</HintPath>
154+
</Reference>
155+
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
156+
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
157+
</Reference>
138158
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
139159
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
140-
<Private>True</Private>
141-
<Private>True</Private>
142160
</Reference>
143161
<Reference Include="System.Runtime.Serialization" />
144162
<Reference Include="System.ServiceModel" />
163+
<Reference Include="System.Text.Encodings.Web, Version=5.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
164+
<HintPath>..\packages\System.Text.Encodings.Web.5.0.1\lib\net461\System.Text.Encodings.Web.dll</HintPath>
165+
</Reference>
166+
<Reference Include="System.Text.Json, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
167+
<HintPath>..\packages\System.Text.Json.5.0.2\lib\net461\System.Text.Json.dll</HintPath>
168+
</Reference>
169+
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
170+
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
171+
</Reference>
145172
<Reference Include="System.Transactions" />
173+
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
174+
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
175+
</Reference>
146176
<Reference Include="System.Web.Extensions" />
147177
<Reference Include="System.Windows.Forms" />
148178
<Reference Include="System.Windows.Forms.DataVisualization" />
@@ -183,6 +213,7 @@
183213
<DependentUpon>Resources.resx</DependentUpon>
184214
</Compile>
185215
<Compile Include="Translator.cs" />
216+
<None Include="packages.config" />
186217
<None Include="UninstallCleanup.ps1" />
187218
<Compile Include="UserFeedback.cs">
188219
<SubType>Form</SubType>
@@ -332,7 +363,6 @@
332363
<None Include="Resources\logo PNG.png" />
333364
<None Include="app.manifest" />
334365
<None Include="Resources\ACC_loading_icon.ico" />
335-
<None Include="packages.config" />
336366
<None Include="Properties\Settings.settings">
337367
<Generator>SettingsSingleFileGenerator</Generator>
338368
<LastGenOutput>Settings1.Designer.cs</LastGenOutput>

AssistantComputerControl/MainProgram.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -383,14 +383,6 @@ void ActualMain() {
383383
Properties.Settings.Default.Save();
384384
}
385385

386-
if (Properties.Settings.Default.UID != "") {
387-
SentrySdk.ConfigureScope(scope => {
388-
scope.User = new Sentry.Protocol.User {
389-
Id = Properties.Settings.Default.UID
390-
};
391-
});
392-
}
393-
394386
using (SentrySdk.Init(sentryToken)) {
395387
sentryOK = true;
396388
}
@@ -431,15 +423,15 @@ public static void TaskSchedulerSetup () {
431423
var ps1File = Path.Combine(MainProgram.currentLocation, "ExtraCleanupper.ps1");
432424

433425
try {
434-
var userId = WindowsIdentity.GetCurrent().Name;
435426
using (var ts = new TaskService()) {
436427
var td = ts.NewTask();
437428
td.RegistrationInfo.Author = "Albert MN. | AssistantComputerControl";
438429
td.RegistrationInfo.Description = "AssistantComputerControl cleanup - clears the action folder to prevent the same action being executed twice";
430+
td.Principal.RunLevel = TaskRunLevel.LUA;
439431

440432
td.Actions.Add(new ExecAction("mshta.exe", $"vbscript:Execute(\"CreateObject(\"\"WScript.Shell\"\").Run \"\"powershell -ExecutionPolicy Bypass & '{ps1File}' '{Path.Combine(MainProgram.CheckPath(), "*")}' '*.{Properties.Settings.Default.ActionFileExtension}'\"\", 0:close\")", null));
441433

442-
td.Triggers.Add(new LogonTrigger { UserId = userId, });
434+
td.Triggers.Add(new LogonTrigger { UserId = WindowsIdentity.GetCurrent().Name, });
443435
ts.RootFolder.RegisterTaskDefinition(@"AssistantComputerControl cleanup", td);
444436
}
445437
} catch (Exception e) {

AssistantComputerControl/WebFiles/AboutVersion.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
<li class="mb-3">
3737
<i>Version 1.4.5 hotfix notes;</i>
3838
<ul>
39-
<li class="mb-2 mt-1">Hopefully fixed the PowerShell window blink on startup, thanks to community member <code>minhe7735</code> - <b>needs testing</b></li>
39+
<li class="mb-2"><b>No longer requires administrator rights!</b></li>
40+
<li class="mb-2 mt-1">Hopefully fixed the PowerShell window blink on startup, thanks to community member <code>minhe7735</code></li>
4041
<li class="mb-2">Implemented auto discover of Google Drive path <i>(for new Google Drive software)</i></li>
4142
<li class="mb-2">Added <code>display_switch</code> action, to switch display mode</li>
4243
<li class="mb-2">Hopefully allow open of <code>.exe</code> files within <code>%windir%</code> folder</li>
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)