update install_wufuc.bat and readme.md
This commit is contained in:
19
README.md
19
README.md
@@ -51,6 +51,8 @@ If you are interested, you can read my original write up on discovering the CPU
|
||||
- `/NORESTART` - Automatically declines rebooting after the setup finishes.
|
||||
- `/UNATTENDED` - Skips all prompts for user interaction, and automatically restarts unless `/NORESTART` is also specified.
|
||||
|
||||
These must be used from an elevated command line prompt.
|
||||
|
||||
## How it works
|
||||
|
||||
Basically, inside a system file called `wuaueng.dll` there are two functions responsible for the CPU check: `IsDeviceServiceable(void)` and `IsCPUSupported(void)`.
|
||||
@@ -64,6 +66,23 @@ My patch takes advantage of this behavior by patching a couple of boolean values
|
||||
* `RegQueryValueExW` hook is necessary to provide compatibility with attempts by other third-parties at bypassing the CPU check. (see issue [#100](../../issues/100))
|
||||
- If wufuc gets loaded by a `svchost.exe` process that isn't related to Windows Update, it goes into a dormant state and no hooks are applied.
|
||||
|
||||
## What to do if you get stuck on a black screen with just a cursor after the Windows boot animation
|
||||
|
||||
This will happen if wufuc somehow manages to crash the `svchost.exe` process that is responsible for displaying the login screen.
|
||||
Normally this should **never ever** happen, because wufuc goes dormant in `svchost.exe` processes that are unrelated to Windows Update.
|
||||
I have only encountered this during development with very unstable code, or by causing it intentionally.
|
||||
|
||||
However, just in case this does happen to someone, here is how to fix it:
|
||||
|
||||
1. [Boot into Safe Mode with Command Prompt](https://support.microsoft.com/en-us/help/17419/windows-7-advanced-startup-options-safe-mode).
|
||||
2. In the command prompt type `regedit` and press enter.
|
||||
3. Navigate to the key `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options`
|
||||
4. Expand the `Image File Execution Options` tree.
|
||||
5. Locate the `svchost.exe` sub key, right-click it and press **Delete**.
|
||||
6. Reboot.
|
||||
7. You should be able to log in normally again.
|
||||
8. **If this happens to you, please report it in the issues tab so I can try to figure out what is causing the crash!**
|
||||
|
||||
## Sponsors
|
||||
|
||||
### [Advanced Installer](http://www.advancedinstaller.com/)
|
||||
|
@@ -56,12 +56,8 @@ set "systemfolder=%systemroot%\System32"
|
||||
if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
|
||||
goto :is_x64
|
||||
) else (
|
||||
if /I "%PROCESSOR_ARCHITEW6432%"=="AMD64" (
|
||||
goto :is_wow64
|
||||
)
|
||||
if /I "%PROCESSOR_ARCHITECTURE%"=="x86" (
|
||||
goto :is_x86
|
||||
)
|
||||
if /I "%PROCESSOR_ARCHITEW6432%"=="AMD64" goto :is_wow64
|
||||
if /I "%PROCESSOR_ARCHITECTURE%"=="x86" goto :is_x86
|
||||
)
|
||||
goto :unsupported
|
||||
|
||||
@@ -160,24 +156,23 @@ echo You will need to restart your PC to finish uninstalling wufuc.
|
||||
goto :confirm_restart
|
||||
|
||||
:uninstall
|
||||
sfc /SCANFILE="%systemroot%\System32\wuaueng.dll"
|
||||
:: restore wuaueng.dll if it was modified by 0.1-0.5
|
||||
sfc /SCANFILE="%systemfolder%\wuaueng.dll"
|
||||
|
||||
:: remove traces of wufuc 0.6-0.7
|
||||
set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}"
|
||||
schtasks /Query /TN "%wufuc_task%" >nul 2>&1 && (
|
||||
schtasks /Delete /TN "%wufuc_task%" /F
|
||||
)
|
||||
schtasks /Delete /TN "%wufuc_task%" /F )
|
||||
rundll32 "%wufuc_dll_fullpath%",RUNDLL32_LegacyUnload
|
||||
reg query "%regkey%" >nul 2>&1 || (
|
||||
goto :delete_target
|
||||
)
|
||||
reg delete "%regkey%" /f || (
|
||||
goto :skip_delete
|
||||
)
|
||||
|
||||
:: remove traces of wufuc >=0.8
|
||||
reg query "%regkey%" >nul 2>&1 || goto :delete_target
|
||||
reg delete "%regkey%" /f || goto :skip_delete
|
||||
:delete_target
|
||||
set "del_ext=.del-%random%"
|
||||
if exist "%wufuc_dll_target%" (
|
||||
ren "%wufuc_dll_target%" "%wufuc_dll%%del_ext%" && (
|
||||
rundll32 "%wufuc_dll_fullpath%",RUNDLL32_DeleteFile "%wufuc_dll_target%%del_ext%"
|
||||
)
|
||||
rundll32 "%wufuc_dll_fullpath%",RUNDLL32_DeleteFile "%wufuc_dll_target%%del_ext%" )
|
||||
)
|
||||
:skip_delete
|
||||
exit /b
|
||||
|
Reference in New Issue
Block a user