diff --git a/appveyor.yml b/appveyor.yml index dfe5a57..d6bc52f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ before_build: after_build: - cmd: >- - copy /Y "wufuc\bin\%CONFIGURATION%\%PLATFORM%\wufuc.dll" "setup-batch\" + copy /Y "wufuc\bin\%CONFIGURATION%\%PLATFORM%\wufuc*.dll" "setup-batch\" copy /Y "LICENSE" "setup-batch\COPYING.txt" diff --git a/setup-batch/Helper Scripts/disable_wufuc.bat b/setup-ai/Helper Scripts/disable_wufuc.bat similarity index 100% rename from setup-batch/Helper Scripts/disable_wufuc.bat rename to setup-ai/Helper Scripts/disable_wufuc.bat diff --git a/setup-batch/Helper Scripts/enable_wufuc.bat b/setup-ai/Helper Scripts/enable_wufuc.bat similarity index 100% rename from setup-batch/Helper Scripts/enable_wufuc.bat rename to setup-ai/Helper Scripts/enable_wufuc.bat diff --git a/setup-ai/wufuc.aip b/setup-ai/wufuc.aip index 833acc2..045e2a0 100644 --- a/setup-ai/wufuc.aip +++ b/setup-ai/wufuc.aip @@ -9,7 +9,7 @@ - + @@ -60,8 +60,8 @@ - - + + diff --git a/setup-batch/install_wufuc.bat b/setup-batch/install_wufuc.bat index 3860bb1..9cd10c3 100644 --- a/setup-batch/install_wufuc.bat +++ b/setup-batch/install_wufuc.bat @@ -43,13 +43,14 @@ goto :unsupported_os :is_x86 set "WINDOWS_ARCHITECTURE=x86" +set "wufuc_dll=%~dp0wufuc32.dll" goto :dll_exists :is_x64 set "WINDOWS_ARCHITECTURE=x64" +set "wufuc_dll=%~dp0wufuc64.dll" :dll_exists -set "wufuc_dll=%~dp0wufuc.dll" if exist "%wufuc_dll%" ( goto :get_ver ) diff --git a/setup-batch/uninstall_wufuc.bat b/setup-batch/uninstall_wufuc.bat index 839f103..0ad0626 100644 --- a/setup-batch/uninstall_wufuc.bat +++ b/setup-batch/uninstall_wufuc.bat @@ -41,13 +41,14 @@ goto :die :is_x86 set "WINDOWS_ARCHITECTURE=x86" +set "wufuc_dll=%~dp0wufuc32.dll" goto :get_ver :is_x64 set "WINDOWS_ARCHITECTURE=x64" +set "wufuc_dll=%~dp0wufuc64.dll" :get_ver -set "wufuc_dll=%~dp0wufuc.dll" for /f "tokens=*" %%i in ('wmic /output:stdout datafile where "name='%wufuc_dll:\=\\%'" get Version /value ^| find "="') do set "%%i" title wufuc uninstaller - v%Version% diff --git a/setup-batch/utility scripts/disable_wufuc.bat b/setup-batch/utility scripts/disable_wufuc.bat new file mode 100644 index 0000000..550dafb --- /dev/null +++ b/setup-batch/utility scripts/disable_wufuc.bat @@ -0,0 +1,61 @@ +@echo off +title wufuc utility - disable task +:: 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 :disable + +:is_x64 +set "wufuc_dll=%~dp0..\wufuc64.dll" + +:disable +set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}" +rundll32 "%wufuc_dll%",Rundll32Unload +net start Schedule +schtasks /Change /TN "%wufuc_task%" /DISABLE + +echo. +echo Disabled wufuc! You will still be able to check for updates until you restart. + +:die +echo. +pause +exit diff --git a/setup-batch/utility scripts/enable_wufuc.bat b/setup-batch/utility scripts/enable_wufuc.bat new file mode 100644 index 0000000..4b2e1c6 --- /dev/null +++ b/setup-batch/utility scripts/enable_wufuc.bat @@ -0,0 +1,41 @@ +@echo off +title wufuc utility - enable task +:: 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 +) + +set "wufuc_task=wufuc.{72EEE38B-9997-42BD-85D3-2DD96DA17307}" +net start Schedule +schtasks /Change /TN "%wufuc_task%" /ENABLE +schtasks /Run /TN "%wufuc_task%" + +echo. +echo Enabled and started wufuc! + +:die +echo. +pause +exit diff --git a/setup-batch/Helper Scripts/repair_wuaueng.dll.bat b/setup-batch/utility scripts/repair_wuaueng.dll.bat similarity index 100% rename from setup-batch/Helper Scripts/repair_wuaueng.dll.bat rename to setup-batch/utility scripts/repair_wuaueng.dll.bat diff --git a/wufuc/wufuc.vcxproj b/wufuc/wufuc.vcxproj index aa53eb5..f85c591 100644 --- a/wufuc/wufuc.vcxproj +++ b/wufuc/wufuc.vcxproj @@ -74,28 +74,28 @@ true $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ - $(ProjectName) + $(ProjectName)$(PlatformArchitecture) false true $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ - $(ProjectName) + $(ProjectName)$(PlatformArchitecture) false false $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ - $(ProjectName) + $(ProjectName)$(PlatformArchitecture) false false $(ProjectDir)bin\$(Configuration)\$(PlatformShortName)\ $(ProjectDir)$(BaseIntermediateOutputPath)$(Configuration)\$(PlatformShortName)\ - $(ProjectName) + $(ProjectName)$(PlatformArchitecture) false