{"id":562,"date":"2008-04-27T12:31:20","date_gmt":"2008-04-27T12:31:20","guid":{"rendered":"http:\/\/neosmart.net\/blog\/2008\/ireboot-and-working-around-uac-limitations\/"},"modified":"2013-08-26T18:18:21","modified_gmt":"2013-08-26T23:18:21","slug":"ireboot-and-working-around-uac-limitations","status":"publish","type":"post","link":"https:\/\/neosmart.net\/blog\/ireboot-and-working-around-uac-limitations\/","title":{"rendered":"Want UAC-Free iReboot? You got it: iReboot 1.1 released!"},"content":{"rendered":"<p><img class=\"colorbox-562\"  decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/iReboot.png\" align=\"right\" \/> Back in August of 2007, NeoSmart Technologies released iReboot 1.0 &#8211; a tiny application that sits quietly and unobtrusively in the taskbar and is used to select which OS you&#8217;d like to reboot into.<\/p>\n<p>iReboot isn&#8217;t by any means a major application, but it&#8217;s gathered a pretty strong following over the months, mostly by people interested in boosting productivity (or increasing laziness) to the max. But there was one flaw in iReboot that made all the hard work we put into making it as unobtrusive and minimalistic as possible almost meaningless: if you had UAC enabled, iReboot will not run automatically at startup, no matter what you do.<\/p>\n<p>This behavior comes as a result of the architecture that Microsoft used to secure Windows Vista, which doesn&#8217;t allow for applications requiring admin approval to run at startup. It doesn&#8217;t matter what your application does or if you absolutely trust it beyond the shadow of the doubt, Windows Vista simply won&#8217;t let an application that runs in elevated privileges mode to launch at startup &#8211; end of story.<\/p>\n<p> <!--more-->  <\/p>\n<p>Users of iReboot were <a href=\"http:\/\/neosmart.net\/forums\/showthread.php?t=1096\" rel=\"follow\">quick to point out<\/a> that this is a major drawback that made it almost useless &#8211; after all, it&#8217;s far less productive to have to manually run an application when you want to reboot than it is to wait for that startup screen to appear and select the OS you want. So we set about finding a solution.<\/p>\n<p>We&#8217;ve just released iReboot 1.1, a <strong>UAC-free implementation<\/strong> that doesn&#8217;t require admin approval, elevation, etc. past the initial installation. And, yes, it does run automatically at startup too!<\/p>\n<p><strong>The Gory Details <\/strong>(feel free to skip below to the download links!)<\/p>\n<p>In order for iReboot to be of any use, we had to get around Microsoft&#8217;s UAC limitations. For iReboot, it was of the absolute importance that it run at startup, <em>and<\/em> that it be allowed system access from normal user accounts. On Windows XP &#8211; where everyone runs as an Administrator and there are no annoying UAC prompts &#8211; it was a non-issue. But on Windows Vista, the new architectural requirements for running applications in elevated privilege modes made it near impossible.<\/p>\n<p>While digging around for possible solutions, <a href=\"https:\/\/neosmart.net\/forums\/showthread.php?t=1096&amp;#post8077\" rel=\"follow\">it became clear<\/a> that the only possible fix would be to split iReboot into two parts. One would run in the background as a service, running under the SYSTEM or LOCAL SERVICE accounts and having privileged access to the OS without requiring admin approval or UAC elevation, and with the second half running as an <em>unprivileged<\/em> userspace client program which interacts with the service backend to get stuff done.<\/p>\n<p>The resulting application has an installer &#8211; which requires admin privileges, of course &#8211; which installs and launches the background service. The background service has full permission to do what we need to get operating system XXXX to be the default option for the next boot, but &#8211; in line with the Windows Service Model &#8211; cannot be interacted with by end users.<\/p>\n<p>The installer also adds a normal UI application which sits in the taskbar (from where end-users may interact with and use iReboot) and communicates with the backend service via a custom API <em>which must not require the execution of any privileged code<\/em>. The service can do whatever it wants (well, whatever <em>we<\/em> want it to do, but lets not get picky here!), but the client program must only perform actions which normal, unprivileged users have permission to execute. <\/p>\n<p>By using a standard inter-process communication API we avoided the need for any special actions on behalf of the client application, effectively separating logic (residing and executing on the backend service, free from the many limitations of UAC) and presentation\/design (the client application, bound to obey UAC&#8217;s every wish).<\/p>\n<p><strong>The Bottom Line<\/strong><\/p>\n<p>Anyone running Windows XP or Windows Vista &#8211; with or without UAC and\/or admin approval mode enabled &#8211; can now run iReboot at startup and use it to boot into whatever OS they like (in conjunction with <a href=\"http:\/\/neosmart.net\/EasyBCD\/\" rel=\"follow\">EasyBCD<\/a>, of course!).<\/p>\n<p><strong>But getting this far wasn&#8217;t easy<\/strong>. With Windows Vista, what <em>should have been<\/em> 100 lines of code maximum ended up being a dozen times longer, split across two different processes, and requiring way too much man-hours to write the most minimalist and to-the-point piece of software we&#8217;ve released to date.<\/p>\n<p>Perhaps most importantly though, is the fact that <strong>Windows Vista&#8217;s newly-implemented security limitations are artificial at best, easy to code around, and only there to give the <em>impression<\/em> of security.<\/strong> Any program that UAC blocks from starting up &quot;for good security reasons&quot; can be coded to work around these limitations with (relative) ease. The &quot;architectural redesign&quot; of Vista&#8217;s security framework isn&#8217;t so much a rebuilt system as much as it is a makeover, intended to give the false impression of a more secure OS.<\/p>\n<p>With the current Windows Vista security models, Microsoft can <em>claim <\/em>that Vista blocks system-modification tools from running at startup; but the truth is, there are still many ways to get them to run. At the end of day, our experience with iReboot and Vista&#8217;s security implementations brings us to the sad conclusion that with Windows Vista, Microsoft has made ISVs&#8217; jobs more complicated without actually providing any any further protection for end users from malware authors &#8211; which certainly isn&#8217;t the best way of going about this task.<\/p>\n<p>Anyway, the fruits of our efforts:<\/p>\n<p class=\"save\"><a href=\"http:\/\/neosmart.net\/iReboot\/\" rel=\"follow\">Download iReboot 1.1<\/a> (248 KiB)<\/p>\n<p align=\"right\">[<a href=\"http:\/\/neosmart.net\/forums\/\" rel=\"follow\">support<\/a>] [<a href=\"http:\/\/neosmart.net\/Donate\/\" rel=\"follow\">donate<\/a>] [<a href=\"http:\/\/neosmart.net\/Software\/Changelog\/11\" rel=\"follow\">changelog<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in August of 2007, NeoSmart Technologies released iReboot 1.0 &#8211; a tiny application that sits quietly and unobtrusively in the taskbar and is used to select which OS you&#8217;d like to reboot into. iReboot isn&#8217;t by any means a &hellip; <a href=\"https:\/\/neosmart.net\/blog\/ireboot-and-working-around-uac-limitations\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[639,360,495,11,12,638,901,179,53,4],"class_list":["post-562","post","type-post","status-publish","format-standard","hentry","category-software","tag-architecture","tag-coding","tag-ireboot","tag-programming","tag-security","tag-services","tag-software","tag-uac","tag-vista","tag-windows"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4xDa-94","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/562","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/comments?post=562"}],"version-history":[{"count":5,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/562\/revisions"}],"predecessor-version":[{"id":2527,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/posts\/562\/revisions\/2527"}],"wp:attachment":[{"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/media?parent=562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/categories?post=562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/neosmart.net\/blog\/wp-json\/wp\/v2\/tags?post=562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}