{"id":147,"date":"2015-02-20T02:15:06","date_gmt":"2015-02-20T02:15:06","guid":{"rendered":"http:\/\/parablog-wordpress.dockerbox.rei.moe\/?p=147"},"modified":"2015-02-20T02:17:27","modified_gmt":"2015-02-20T02:17:27","slug":"cool-tool-bat","status":"publish","type":"post","link":"https:\/\/blog.lewys.eu\/?p=147","title":{"rendered":"Cool Tool.bat"},"content":{"rendered":"<p>I made a batch script at work today to automate a few things as I was working on 15 PCs at once&#8230;<\/p>\n<p>Thoguht I would share it here in case someone who happens to be in the same situation stumbles on it!<\/p>\n<p>It has a number of features for example changing the PC name, changing the key for MS Office and then activating it, activating the local admin account and setting a password, auto logging a user in, and REBOOT =D<\/p>\n<p>Its probably buggy, but worked 13 times out of 15 for me! so deal with it..<\/p>\n<p>oh, install office doesnt work but meh. \ud83d\ude00<\/p>\n<p>here she be:<\/p>\n<p>&nbsp;<\/p>\n<p>@echo OFF<br \/>\nTITLE Cool Tool<br \/>\ncolor f0<br \/>\n:MENU<br \/>\nCLS<br \/>\nECHO ============= COOLTOOL =============<br \/>\nECHO &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nECHO 0. Install Office<br \/>\nECHO 1. Activate Local Admin (Blank Password)<br \/>\nECHO 2. Rename PC<br \/>\nECHO 3. Auto Login &#8220;Administrator&#8221;<br \/>\nECHO 4. Install office key and activate. (WARNING: INSTALL OFFICE x64 FIRST + CONNECT TO NET)<br \/>\nECHO 5. Reboot PC To apply changes.<br \/>\nECHO ==========PRESS &#8216;Q&#8217; TO QUIT==========<br \/>\nECHO.<\/p>\n<p>SET INPUT=<br \/>\nSET \/P INPUT=Please select a number:<\/p>\n<p>IF \/I &#8216;%INPUT%&#8217;==&#8217;0&#8217; GOTO OFFICE<br \/>\nIF \/I &#8216;%INPUT%&#8217;==&#8217;1&#8217; GOTO ADMIN<br \/>\nIF \/I &#8216;%INPUT%&#8217;==&#8217;2&#8217; GOTO RENAME<br \/>\nIF \/I &#8216;%INPUT%&#8217;==&#8217;3&#8217; GOTO LOGIN<br \/>\nIF \/I &#8216;%INPUT%&#8217;==&#8217;4&#8217; GOTO OFFICEKEY<br \/>\nIF \/I &#8216;%INPUT%&#8217;==&#8217;5&#8217; GOTO REBOOT<br \/>\nIF \/I &#8216;%INPUT%&#8217;==&#8217;Q&#8217; GOTO Quit<\/p>\n<p>:OFFICE<br \/>\noffice\\setup.exe<\/p>\n<p>GOTO MENU<\/p>\n<p>:LOGIN<br \/>\necho 1st run.<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v AutoAdminLogon \/t REG_SZ \/d 1 \/f<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v DefaultUserName \/t REG_SZ \/d User \/f<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v DefaultPassword \/t REG_SZ \/d Password \/f<br \/>\necho 2nd run..<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v AutoAdminLogon \/t REG_SZ \/d 1 \/f<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v DefaultUserName \/t REG_SZ \/d User \/f<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v DefaultPassword \/t REG_SZ \/d Password \/f<br \/>\necho 3rd run&#8230;<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v AutoAdminLogon \/t REG_SZ \/d 1 \/f<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v DefaultUserName \/t REG_SZ \/d User \/f<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v DefaultPassword \/t REG_SZ \/d Password \/f<br \/>\necho 4th run&#8230;.<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v AutoAdminLogon \/t REG_SZ \/d 1 \/f<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v DefaultUserName \/t REG_SZ \/d User \/f<br \/>\nREG ADD &#8220;HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon&#8221; \/v DefaultPassword \/t REG_SZ \/d Password \/f<br \/>\ndone. =D<br \/>\nGOTO MENU<\/p>\n<p>:RENAME<br \/>\nSET INPUT=<br \/>\nSET \/P INPUT=Input Computer Number:<\/p>\n<p>echo PCs new name will be: %INPUT%<br \/>\npause<br \/>\nwmic path win32_computersystem where &#8220;Name=&#8217;%computername%'&#8221; CALL rename name=&#8217;%INPUT%&#8217;<\/p>\n<p>GOTO MENU<\/p>\n<p>:ADMIN<br \/>\nnet user administrator \/active:yes<br \/>\nnet user administrator &#8220;Password&#8221;<\/p>\n<p>GOTO MENU<\/p>\n<p>:OFFICEKEY<br \/>\ncd &#8220;C:\\Program Files\\Microsoft Office\\Office14\\&#8221;<br \/>\ndelay 3<br \/>\ncscript ospp.vbs \/inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx<br \/>\necho I SET THE KEY FOR YA. Now to activate&#8230;<br \/>\ncscript ospp.vbs \/act<br \/>\necho DONE!<\/p>\n<p>&nbsp;<\/p>\n<p>By the way,<\/p>\n<p>The auto login runs a bunch of times because sometimes it works but doesnt&#8230;work..?<br \/>\n\ud83d\ude00<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I made a batch script at work today to automate a few things as I was working on 15 PCs at once&#8230; Thoguht I would share it here in case someone who happens to be in the same situation stumbles on it! It has a number of features for example changing the PC name, changing &hellip; <a href=\"https:\/\/blog.lewys.eu\/?p=147\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Cool Tool.bat<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,27],"tags":[],"class_list":["post-147","post","type-post","status-publish","format-standard","hentry","category-educational","category-programming"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts\/147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=147"}],"version-history":[{"count":2,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts\/147\/revisions"}],"predecessor-version":[{"id":149,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=\/wp\/v2\/posts\/147\/revisions\/149"}],"wp:attachment":[{"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lewys.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}