Advertisement
Jailout2000

win10fix_full.bat

Jun 15th, 2015
1,870
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 7.51 KB | None | 0 0
  1. @echo off
  2. title Windows 10 Missing Icon Fixes
  3. goto foreward
  4. :foreward
  5. color 0b
  6. cls
  7. echo The methods inside this batch modify files and registry settings.
  8. echo While they are tested and tend to work, I take no responsibility for the use of this file.
  9. echo This batch is provided without warranty. Any damage caused is your own responsibility.
  10. echo.
  11. echo As well, batch files are almost always flagged by anti-virus, feel free to review the code if you're unsure.
  12. echo.
  13. echo If you understand the above, and accept - press any key to continue...
  14. pause > NUL
  15. goto elevatecheck
  16. :elevatecheck
  17. color 0c
  18. cls
  19. echo Checking for Administrator elevation...
  20. echo.
  21. echo.
  22. openfiles > NUL 2>&1
  23. if %errorlevel%==0 (
  24.     echo Elevation found! Proceeding...
  25.     goto vercheck
  26. ) else (
  27.     echo You are not running as Administrator...
  28.     echo This batch cannot do it's job without elevation!
  29.     echo.
  30.     echo Right-click and select ^'Run as Administrator^' and try again...
  31.     echo.
  32.     echo Press any key to exit...
  33.     pause > NUL
  34.     exit
  35. )
  36. :vercheck
  37. color 0c
  38. cls
  39. echo Performing Pre-Checks...
  40. for /f "tokens=4-5 delims=. " %%i in ('ver') do set version=%%i.%%j
  41. if "%version%"=="6.3" set allow=1
  42. if "%version%"=="6.1" set allow=1
  43. if %allow%==1 goto warning
  44. set allow=0
  45. echo.
  46. echo You did not pass the pre-requisites.
  47. echo If you're running Windows 8, go install Windows 8.1 from the Store.
  48. echo.
  49. echo Press any key to exit.
  50. pause > NUL
  51. exit
  52. :warning
  53. color 0b
  54. cls
  55. echo Warning about qualifications...
  56. echo.
  57. echo.
  58. echo Just because your version checks out, doesn't mean you're eligible for the free upgrade!
  59. echo Notably, the following are not elibile for Windows 10 via Windows Update...
  60. echo.
  61. echo Windows 7 RTM
  62. echo Windows 8
  63. echo Windows 8.1 RTM
  64. echo Windows RT
  65. echo Windows Phone 8.0
  66. echo.
  67. echo Press any key to continue...
  68. pause > NUL
  69. goto menu
  70. :menu
  71. color 0b
  72. cls
  73. echo Main Menu
  74. echo.
  75. echo.
  76. echo 1^) Check Update Status
  77. echo 2^) Quick-Method #1 ^[JC from answers.microsoft.com^]
  78. echo 3^) Quick-Method #2 ^[KevinStevens_845 from answers.microsoft.com^]
  79. echo 4^) Long-Method #1 ^[Yaqub K from answers.microsoft.com^]
  80. echo 5^) EXIT
  81. echo.
  82. set /p mmchoice=Selection:
  83. if %mmchoice%==1 goto upstatus
  84. if %mmchoice%==2 goto qm1
  85. if %mmchoice%==3 goto qm2
  86. if %mmchoice%==4 goto lm1
  87. if %mmchoice%==5 exit
  88. goto error
  89. :error
  90. color 0C
  91. cls
  92. echo Main Menu - Error!
  93. echo.
  94. echo.
  95. echo You did not enter a valid entry.
  96. echo.
  97. echo Press any key to return to the main menu and try again.
  98. pause > NUL
  99. goto menu
  100. :upstatus
  101. cls
  102. echo Checking for appropriate update installation status...
  103. echo.
  104. echo.
  105. if "%version%"=="6.3" goto upstatus8
  106. if "%version%"=="6.1" goto upstatus7
  107. goto menu
  108. :upstatus8
  109. echo Windows 8^+ detected...
  110. echo.
  111. set upcheck=3035583
  112. echo Checking for update KB%upcheck%...
  113. dism /online /get-packages | findstr %upcheck% > NUL
  114. if %errorlevel%==0 (
  115.     echo Update KB%upcheck% is installed!
  116.     set missupdate=0
  117. ) else (
  118.     echo Update KB%upcheck% is missing!
  119.     set missupdate=1
  120. )
  121. echo.
  122. set upcheck=3035583
  123. echo Checking for update KB%upcheck%...
  124. dism /online /get-packages | findstr %upcheck% > NUL
  125. if %errorlevel%==0 (
  126.     echo Update KB%upcheck% is installed!
  127. ) else (
  128.     echo Update KB%upcheck% is missing!
  129.     set /a missupdate=%missupdate%+1>NUL
  130. )
  131. echo.
  132. echo.
  133. if %missupdate%==0 (
  134.     echo You are not missing any updates, congratulations!
  135. ) else (
  136.     echo You are missing %missupdate% update^(s^).
  137. )
  138. echo Press any key to return to the main menu...
  139. pause > NUL
  140. goto menu
  141. :upstatus7
  142. echo Windows 7 detected...
  143. echo.
  144. set upcheck=3035583
  145. echo Checking for update KB%upcheck%...
  146. dism /online /get-packages | findstr %upcheck% > NUL
  147. if %errorlevel%==0 (
  148.     echo Update KB%upcheck% is installed!
  149.     set missupdate=0
  150. ) else (
  151.     echo Update KB%upcheck% is missing!
  152.     set missupdate=1
  153. )
  154. echo.
  155. set upcheck=2952664
  156. echo Checking for update KB%upcheck%...
  157. dism /online /get-packages | findstr %upcheck% > NUL
  158. if %errorlevel%==0 (
  159.     echo Update KB%upcheck% is installed!
  160. ) else (
  161.     echo Update KB%upcheck% is missing!
  162.     set /a missupdate=%missupdate%+1>NUL
  163. )
  164. echo.
  165. echo.
  166. if %missupdate%==0 (
  167.     echo You are not missing any updates, congratulations!
  168. ) else (
  169.     echo You are missing %missupdate% update^(s^).
  170. )
  171. echo Press any key to return to the main menu...
  172. pause > NUL
  173. goto menu
  174. :qm1
  175. cls
  176. echo Quick-Method #1 ^[JC from answers.microsoft.com^]
  177. echo.
  178. echo.
  179. echo Updating registry...
  180. reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\UpgradeExperienceIndicators" /v UpgEx /t REG_SZ /d Green /f
  181. echo Trying to launch notification tray application...
  182. %SystemRoot%\System32\GWX\GWX.exe /taskLaunch
  183. echo.
  184. echo This method is now complete - and is also instant!
  185. echo You should see the Windows 10 icon in your notification tray.
  186. echo If you do not, return to the menu and try another method.
  187. echo.
  188. echo Press any key to return to the main menu...
  189. pause > NUL
  190. goto menu
  191. :qm2
  192. echo Quick-Method #2 ^[KevinStevens_845 from answers.microsoft.com^]
  193. echo.
  194. echo.
  195. echo Trying to launch GWX task...
  196. %SystemRoot%\System32\GWX\GWX.exe /taskLaunch
  197. echo Trying to refresh GWX config...
  198. %SystemRoot%\System32\GWX\GWXConfigManager.exe /RefreshConfig
  199. echo.
  200. echo This method is now complete - but it could take a few minutes.
  201. echo In approximately 10 minutes you should see the Windows 10 icon in your notification tray.
  202. echo If you do not, return to the menu and try another method.
  203. echo.
  204. echo Press any key to return to the main menu...
  205. pause > NUL
  206. goto menu
  207. :lm1
  208. cls
  209. echo Long-Method #1 ^[Yaqub K from answers.microsoft.com^]
  210. echo.
  211. echo.
  212. echo This method can take anywhere from 10 minutes on.
  213. echo I've had this run up to 40 minutes during my tests...
  214. echo.
  215. echo This will loop for a while but please note...
  216. echo If you see the ^"STATUS^" as anything but ^"RUNNING^", there is something wrong.
  217. echo If that happens, close the batch file and start over. It may take a few times.
  218. echo.
  219. echo Further, due to the way this script was originally written, you may have to re-launch this batch to continue.
  220. echo.
  221. echo If you understand the above, press any key to continue.
  222. pause > NUL
  223. color 0c
  224. cls
  225. echo Work has begun...
  226. REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\UpgradeExperienceIndicators" /v UpgEx | findstr UpgEx
  227. if "%errorlevel%"=="0" goto RunGWX
  228. reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Appraiser" /v UtcOnetimeSend /t REG_DWORD /d 1 /f
  229. schtasks /run /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"
  230. echo THIS MAY CAUSE A LOOP - CHECK FOR RUNNING STATUS!!! &echo THIS MAY CAUSE A LOOP - CHECK FOR RUNNING STATUS!!! &echo THIS MAY CAUSE A LOOP - CHECK FOR RUNNING STATUS!!!
  231. :CompatCheckRunning
  232. schtasks /query /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"
  233. schtasks /query /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" | findstr Ready
  234. if not "%errorlevel%"=="0" ping localhost > NUL &goto :CompatCheckRunning
  235. :RunGWX
  236. schtasks /run /TN "\Microsoft\Windows\Setup\gwx\refreshgwxconfig"
  237. color 0b
  238. cls
  239. echo.
  240. echo This method is now complete.
  241. echo Reports show that this could take up to an hour to show the icon.
  242. echo It is also recommended that you reboot your PC if it has not shown up after that hour wait.
  243. echo.
  244. echo If you do not see the notification tray icon, try another method.
  245. echo If you are using this method last, please wait in the Microsoft Answers forums for a new answer.
  246. echo.
  247. echo Press any key to return to the main menu...
  248. pause > NUL
  249. goto menu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement