{"id":3676,"date":"2011-12-16T15:45:22","date_gmt":"2011-12-16T23:45:22","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/?p=3676"},"modified":"2011-12-16T16:12:37","modified_gmt":"2011-12-17T00:12:37","slug":"why-is-there-a-shield-on-my-icon","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2011\/12\/16\/why-is-there-a-shield-on-my-icon\/","title":{"rendered":"Why is there a shield on my icon?"},"content":{"rendered":"<p>If you package your script with PrimalScript&#8217;s or PrimalForm&#8217;s packager you have the option of including a manifest. This manifest can be used to make your executable file prompt for elevation when executed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2011\/12\/image.png\" width=\"467\" height=\"264\"><\/p>\n<p>It&#8217;s easy to spot the difference between an application that will prompt for elevation and one that does not by looking at the icon:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2011\/12\/image1.png\" width=\"181\" height=\"107\"><\/p>\n<p>Now, imagine the surprise if you get a shield on your icon and an elevation prompt when you run a file you packaged without a manifest.<\/p>\n<p>As you can see from the image below it&#8217;s all in the name:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2011\/12\/image2.png\" width=\"408\" height=\"128\"><\/p>\n<p>I simply took the package with no manifest and renamed it.<\/p>\n<p>So in the absence of a manifest Windows 7 uses the name of your executable file to determine if it need elevation. The terms &#8220;Setup&#8221;, &#8220;Install&#8221; and &#8220;Patch&#8221; trigger that behavior, but <strong>only <\/strong>if the exe file has no manifest at all.<br \/>If you don&#8217;t want your packaged executable to ever prompt for elevation you should add a manifest to all your packages. <\/p>\n<p>I should also note that once you turn UAC (User Access Control) off you won&#8217;t see any of this of course.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you package your script with PrimalScript&#8217;s or PrimalForm&#8217;s packager you have the option of including a manifest. This manifest can be used to make your executable file prompt for elevation when executed. It&#8217;s easy to spot the difference between an application that will prompt for elevation and one that does not by looking at [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[27,283,509,410,24,25],"tags":[437,28,314,37,996],"class_list":["post-3676","post","type-post","status-publish","format-standard","hentry","category-ask-the-experts","category-howto","category-primalforms-software-news","category-primalscript-software-news","category-vbscript","category-windows-powershell","tag-packager","tag-powershell","tag-primalforms","tag-primalscript","tag-vbscript"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/3676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=3676"}],"version-history":[{"count":2,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/3676\/revisions"}],"predecessor-version":[{"id":3678,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/3676\/revisions\/3678"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=3676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=3676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=3676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}