문제

I have this code to uninstall my software:

@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

But it doesn't seem to work and part to the problem is that the uni.bat that is meant to appear doesn't can any one tell me what it wrong.

도움이 되었습니까?

해결책

You have to escape that last ) see below:

echo (del /q /f "%~dpfnx0" ^& exit /6 0^)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top