{"id":90,"date":"2006-09-11T06:38:00","date_gmt":"2006-09-11T13:38:00","guid":{"rendered":"http:\/\/www.jasemccarty.com\/blog\/2006\/09\/autoit-give-users-the-ability-to-defrag-without-admin-access.html"},"modified":"2006-09-11T06:38:00","modified_gmt":"2006-09-11T13:38:00","slug":"autoit-give-users-the-ability-to-defrag-without-admin-access","status":"publish","type":"post","link":"https:\/\/www.jasemccarty.com\/blog\/autoit-give-users-the-ability-to-defrag-without-admin-access\/","title":{"rendered":"AutoIT: Give users the ability to defrag without Admin access"},"content":{"rendered":"<p>I found a cool tool this weekend, called AutoIT V3.<\/p>\n<p>You can find it here: <a style=\"FONT-WEIGHT: bold\" href=\"http:\/\/www.autoitscript.com\/autoit3\/\">http:\/\/www.autoitscript.com\/autoit3\/<\/a><\/p>\n<p>I put together a script that will (running as the local admin) allow a user that has zero admin priviledges the ability to defrag their hard drive.<\/p>\n<p>Here&#8217;s the script:<br \/>\n;**** AutoIT Script to allow users to defrag their hard drive ****<br \/>\n; Set the RunAs parameters to use local adminstrator account<br \/>\nRunAsSet(&#8220;Administrator&#8221;,@ComputerName, &#8220;PASSWORDHERE&#8221;)<\/p>\n<p>; Run defrag as admin<br \/>\nRunWait(&#8220;mmc.exe dfrg.msc&#8221;,@SystemDir)<\/p>\n<p>; Reset user&#8217;s permissions<br \/>\nRunAsSet()<\/p>\n<p>;**** End of Script ****<\/p>\n<p>Save this as defragit.au3, and then using the AutoIT scripting tools and compile the au3 you created.<\/p>\n<p>You can download the script <a href=\"http:\/\/www.jasemccarty.com\/scripts\/defragit.au3.txt\"><span style=\"FONT-WEIGHT: bold\">here<\/span><\/a>.<\/p>\n<p>And you can download AutoIT <a href=\"http:\/\/www.autoitscript.com\/autoit3\/downloads.php\"><span style=\"FONT-WEIGHT: bold\">here<\/span><\/a>.<\/p>\n<p><img decoding=\"async\" src=\"\/images\/defrag.png\" alt=\"\" align=\"left\" \/><br \/>\nIf you want to add a cool Vista style .ico, look at Jrdn88&#8217;s gallery: <a href=\"http:\/\/jrdn88.deviantart.com\/gallery\/\"><strong>http:\/\/jrdn88.deviantart.com\/gallery\/<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I found a cool tool this weekend, called AutoIT V3. You can find it here: http:\/\/www.autoitscript.com\/autoit3\/ I put together a script that will (running as &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-windows"],"_links":{"self":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/comments?post=90"}],"version-history":[{"count":0,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/posts\/90\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/media?parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/categories?post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jasemccarty.com\/blog\/wp-json\/wp\/v2\/tags?post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}