Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

Commit 07d7051

Browse files
committed
去除权限,不装在C盘的Program目录下
1 parent 44e2912 commit 07d7051

File tree

6 files changed

+8
-164
lines changed

6 files changed

+8
-164
lines changed

StickyNotes/App.xaml.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ protected override async void OnStartup(StartupEventArgs e)
4545

4646
if (!ret)
4747
{
48-
AdministratorUtil.KillProcess("StickyNotes");
48+
//AdministratorUtil.KillProcess("StickyNotes");
49+
MessageBox.Show("已运行");
50+
Environment.Exit(0);
4951
}
5052
#endregion
5153
#region 检测管理员权限
52-
AdministratorUtil.RunAsAdmin();
54+
//AdministratorUtil.RunAsAdmin();
5355
#endregion
5456

5557
Logger.Log().Info("程序启动");

StickyNotes/StickyNotes.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@
8080
<AssemblyOriginatorKeyFile>
8181
</AssemblyOriginatorKeyFile>
8282
</PropertyGroup>
83-
<PropertyGroup>
84-
<ApplicationManifest>app.manifest</ApplicationManifest>
85-
</PropertyGroup>
83+
<PropertyGroup />
8684
<PropertyGroup>
8785
<TargetZone>LocalIntranet</TargetZone>
8886
</PropertyGroup>
@@ -254,7 +252,6 @@
254252
<Generator>PublicResXFileCodeGenerator</Generator>
255253
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
256254
</EmbeddedResource>
257-
<None Include="app.manifest" />
258255
<None Include="Properties\Settings.settings">
259256
<Generator>SettingsSingleFileGenerator</Generator>
260257
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

StickyNotes/app.manifest

Lines changed: 0 additions & 73 deletions
This file was deleted.

UpdateApp/App.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ public partial class App : Application
1616
{
1717
protected override void OnStartup(StartupEventArgs e)
1818
{
19-
var args= string.Join(" ",e.Args);
20-
AdministratorUtil.RunAsAdmin(args);
19+
//var args= string.Join(" ",e.Args);
20+
//AdministratorUtil.RunAsAdmin(args);
2121
LangHelper.Instance.SetLang(Common.Lang.Language.Chinese);
2222
if (e.Args.Length != 3)
2323
{

UpdateApp/UpdateApp.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
<PropertyGroup>
4242
<ApplicationIcon>MyLogo.ico</ApplicationIcon>
4343
</PropertyGroup>
44-
<PropertyGroup>
45-
<ApplicationManifest>app.manifest</ApplicationManifest>
46-
</PropertyGroup>
44+
<PropertyGroup />
4745
<ItemGroup>
4846
<Reference Include="CommonServiceLocator, Version=2.0.2.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
4947
<HintPath>..\packages\CommonServiceLocator.2.0.2\lib\net45\CommonServiceLocator.dll</HintPath>
@@ -190,7 +188,6 @@
190188
<Generator>ResXFileCodeGenerator</Generator>
191189
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
192190
</EmbeddedResource>
193-
<None Include="app.manifest" />
194191
<None Include="packages.config" />
195192
<None Include="Properties\Settings.settings">
196193
<Generator>SettingsSingleFileGenerator</Generator>

UpdateApp/app.manifest

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)