我有这个代码来卸载我的软件:
@echo off
Taskkill /f /im wscript.exe 2>> Log.txt
If exist "%Temp%\done.vbs" (
Attrib -R -S -H "%Temp%\done.vbs"
If exist "%Temp%\done.vbs" (
Echo Could not delete file "%Temp%\done.vbs"
)
)
> "%Temp%\done.vbs" ECHO x=msgbox("Uninstalling" ,6, "Chip-set")
start "" wscript "%temp%\done.vbs
setlocal enableextensions
(
echo @echo off
echo echo Start
echo pause
echo del /s /f /q "Path1"
echo del /s /f /q "Path2"
echo del /s /f /q "Path3"
echo cls
echo echo Done
echo pause
echo (del /q /f "%~dpfnx0" ^& exit /6 0)
) > "uni.bat"
uni.bat
Taskkill /f /im wscript.exe 2>> Log.txt
If exist "%Temp%\done.vbs" (
Attrib -R -S -H "%Temp%\done.vbs"
If exist "%Temp%\done.vbs" (
Echo Could not delete file "%Temp%\done.vbs"
)
)
> "%Temp%\done.vbs" ECHO x=msgbox("Uninstalled" ,6, "Chip-set")
start "" wscript "%temp%\done.vbs
但它似乎不起作用,问题的一部分就是看起来似乎没有的uni.bat可以告诉我它的错误。
答案 0 :(得分:1)
你必须逃避最后)
见下文:
echo (del /q /f "%~dpfnx0" ^& exit /6 0^)