From dc7bc74196d7cbbf97dcc1a5cd14cf5ace6f7601 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Wed, 5 Dec 2018 17:49:13 -0600 Subject: [PATCH 1/3] (GH-629) Separate app.manifest By default highestAvailable is desired for UAC prompting behavior, but sometimes there are groups that provide some level of elevation (Network Configuration Operators Group) that also mean that UAC will prompt. This is undesirable behavior in shops that might want to use self-service and have Chocolatey GUI run as the user that invoked without any elevation being requested. To allow this behavior, app.manifest can not be embedded, but must sit next to ChocolateyGUI.exe so that it can be changed for those situations that require it by those users. --- Source/ChocolateyGui/ChocolateyGui.csproj | 12 +++++++----- .../{app.manifest => ChocolateyGui.exe.manifest} | 0 2 files changed, 7 insertions(+), 5 deletions(-) rename Source/ChocolateyGui/{app.manifest => ChocolateyGui.exe.manifest} (100%) diff --git a/Source/ChocolateyGui/ChocolateyGui.csproj b/Source/ChocolateyGui/ChocolateyGui.csproj index 7c8318b88..a348f9510 100644 --- a/Source/ChocolateyGui/ChocolateyGui.csproj +++ b/Source/ChocolateyGui/ChocolateyGui.csproj @@ -16,9 +16,7 @@ - - app.manifest - + 1.0.1 @@ -71,6 +69,9 @@ + + true + ..\packages\Autofac.4.6.1\lib\net45\Autofac.dll @@ -458,9 +459,10 @@ Designer - + Designer - + Always + Designer diff --git a/Source/ChocolateyGui/app.manifest b/Source/ChocolateyGui/ChocolateyGui.exe.manifest similarity index 100% rename from Source/ChocolateyGui/app.manifest rename to Source/ChocolateyGui/ChocolateyGui.exe.manifest From 2012be5580b75d9bc641eea750eeeb97fde7fa8b Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Thu, 6 Dec 2018 11:51:04 +0000 Subject: [PATCH 2/3] (GH-629) Add manifest file to msi --- Source/ChocolateyGui.Install/Product.wxs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/ChocolateyGui.Install/Product.wxs b/Source/ChocolateyGui.Install/Product.wxs index fe2e6e9d1..fd7833fe8 100644 --- a/Source/ChocolateyGui.Install/Product.wxs +++ b/Source/ChocolateyGui.Install/Product.wxs @@ -92,6 +92,9 @@ + + + \ No newline at end of file From 7ec3958fd808f01f0745c1e18dec6c1e6b6432ec Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Thu, 6 Dec 2018 11:12:38 -0600 Subject: [PATCH 3/3] (GH-629) add note on manifest caching Windows behavior of manifest caching is enough to make even the best of admins and developers want to tear out their hair until they realize there is a cache and changes to the manifest are completely ignored by Windows. So leave a breadcrumb here so that folks know if they make a change to the manifest file, they will need to "touch" the file they are trying to get the manifest to take effect for - in this case ChocolateyGUI.exe. The modification date will need changed to clue Windows in that there is a new manifest. This is only when changing the file AFTER the exe / modification date has been run even once. It's better to just say to always update the modification date as someone may not know whether the file has been ran before. --- Source/ChocolateyGui/ChocolateyGui.exe.manifest | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/ChocolateyGui/ChocolateyGui.exe.manifest b/Source/ChocolateyGui/ChocolateyGui.exe.manifest index 445f5e635..a4706c6f0 100644 --- a/Source/ChocolateyGui/ChocolateyGui.exe.manifest +++ b/Source/ChocolateyGui/ChocolateyGui.exe.manifest @@ -21,6 +21,13 @@ The following is an unsupported use case: If you want to utilize File and Registry Virtualization for backward compatibility then delete the requestedExecutionLevel node. + + NOTE: If you do change this file, make sure that you change the + modification date on ChocolateyGUI.exe that this sits next to. + Windows caches manifests based on path and last modified date. So + you'll need to change the modification date on ChocolateyGUI.exe + for the manifest change to take effect. + Details: https://github.com/chocolatey/choco/issues/1292#issuecomment-304068121 -->