From 7619e820416a95e4fe57176ed58982ade951f211 Mon Sep 17 00:00:00 2001 From: zeffy Date: Tue, 20 Jun 2017 04:23:48 -0700 Subject: [PATCH] Add debugview_helper.bat, update README.md --- README.md | 26 ++++---- install/utility scripts/debugview_helper.bat | 66 ++++++++++++++++++++ 2 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 install/utility scripts/debugview_helper.bat diff --git a/README.md b/README.md index 35f13a6..13deb10 100644 --- a/README.md +++ b/README.md @@ -12,21 +12,25 @@ If you are feeling brave, you can try the latest unstable builds [here](https:// ## Reporting an issue [![](https://isitmaintained.com/badge/resolution/zeffy/wufuc.svg)](https://isitmaintained.com/project/zeffy/wufuc "Average time to resolve an issue") -There isn't really a way for wufuc to directly interact with your desktop, because it runs outside the context of a normal user session. Therefore you must first download and run another program called [DebugView](https://technet.microsoft.com/en-us/sysinternals/debugview.aspx) to display wufuc's debug messages. These logs are absolutely crucial if you want me to be able to resolve your issue as quickly as possible, so please include them if you can. +#### Before you create an issue, please make sure of the following: + +- Are you using the latest version? +- If you previously used the old batchfile patches, did you revert it by running `repair_wuaueng.dll.bat`? +- Have you tried restarting your computer? + +There isn't really a way for wufuc to directly interact with your desktop, because it runs outside the context of a normal user session. Therefore you must first download and run another program called [DebugView](https://technet.microsoft.com/en-us/sysinternals/debugview.aspx) (from Microsoft) to display wufuc's debug messages. These logs are absolutely crucial if you want me to be able to resolve your issue as quickly as possible, so please include them if you can. #### The best way to get a log of the entire life-cycle of wufuc is to do the following: -1. Disable wufuc by running `disable_wufuc.bat` as administrator. -2. Start `Dbgview.exe` as administrator and check `Capture -> Capture Global Win32`. -3. Enable wufuc by running `enable_wufuc.bat` as administrator. -4. Start the `wuauserv` service if it isn't already running. -5. Output will be shown in DebugView, copy/paste this text into your issue. +1. Start `Dbgview.exe` as administrator and check `Capture -> Capture Global Win32`. +2. Restart wufuc and `wuauserv` by running `debugview_helper.bat` as administrator. +3. Output will be shown in DebugView, copy/paste this text into your issue. #### Other helpful information to include when reporting issues: - What happened? What did you expect to happen instead? -- What version of wufuc are you using? -- What version of Windows are you using? x86 or x64? +- What build are you using? Stable release or unstable AppVeyor builds? +- What version of Windows are you using? Windows 7 or 8.1? x64 or x86? - Were there any errors reporting during installation? What were they? - What is the file version or SHA-1 hash of `C:\Windows\System32\wuaueng.dll`? - Any other information you feel is relevant to your issue. @@ -61,7 +65,7 @@ My patch takes advantage of this result caching behavior by setting the "hasn't ### Several improvements over my batchfile method: - **No system files are modified!** -- Heuristic-based patching, which means it will usually keep working even after updates. +- Heuristic-based patching, which means it will usually keep working even after new updates come out. - C is best language. - No external dependencies. @@ -77,12 +81,10 @@ To uninstall run `uninstall_wufuc.bat` as administrator. Unless otherwise noted, you should only have to: -- Run `disable_wufuc.bat` as administrator. +- Run `uninstall_wufuc.bat` as administrator. - Copy the new files into the install folder, overwriting the old ones. - Run the new `install_wufuc.bat` as administrator. -If you run into problems, try doing a full uninstall/reinstall. - ### How do I remove your old patch and use this instead? I've included a utility script called `repair_wuaueng.dll.bat`. When you run it, it will initiate an `sfc` scan and revert any changes made to `wuaueng.dll`. diff --git a/install/utility scripts/debugview_helper.bat b/install/utility scripts/debugview_helper.bat new file mode 100644 index 0000000..1eb265e --- /dev/null +++ b/install/utility scripts/debugview_helper.bat @@ -0,0 +1,66 @@ +@echo off +title wufuc utility - debugview helper +:: Copyright (C) 2017 zeffy + +:: This program is free software: you can redistribute it and/or modify +:: it under the terms of the GNU General Public License as published by +:: the Free Software Foundation, either version 3 of the License, or +:: (at your option) any later version. + +:: This program is distributed in the hope that it will be useful, +:: but WITHOUT ANY WARRANTY; without even the implied warranty of +:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +:: GNU General Public License for more details. + +:: You should have received a copy of the GNU General Public License +:: along with this program. If not, see . + +echo Copyright ^(C^) 2017 zeffy +echo This program comes with ABSOLUTELY NO WARRANTY. +echo This is free software, and you are welcome to redistribute it +echo under certain conditions; see COPYING.txt for details. +echo. + +fltmc >nul 2>&1 || ( + echo This batch script requires administrator privileges. Right-click on + echo %~nx0 and select "Run as administrator". + goto :die +) +if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" ( + goto :is_x64 +) else ( + if /I "%PROCESSOR_ARCHITEW6432%"=="AMD64" ( + goto :is_x64 + ) + if /I "%PROCESSOR_ARCHITECTURE%"=="x86" ( + goto :is_x86 + ) +) +goto :die + +:is_x86 +set "wufuc_dll=%~dp0..\wufuc32.dll" +goto :unload + +:is_x64 +set "wufuc_dll=%~dp0..\wufuc64.dll" + +:unload +rundll32 "%wufuc_dll%",Rundll32Unload + +net stop wuauserv + +set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}" +net start Schedule +schtasks /Change /TN "%wufuc_task%" /ENABLE +schtasks /Run /TN "%wufuc_task%" + +timeout /nobreak /t 3 >nul +net start wuauserv + +echo Restarted wufuc and wuauserv. + +:die +echo. +pause +exit