-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUninstallSoftware.bat
38 lines (33 loc) · 1.08 KB
/
UninstallSoftware.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@echo off
call :Check
goto %version%
goto :eof
:install
for /f "skip=1 delims=" %%a in (
'wmic product where "Name like '%%adobe acrobat%%'" get name'
) do @for /f "delims=" %%b in ("%%a") do set SOFTWARE=%%b
IF "%SOFTWARE%" == "Adobe Acrobat Reader DC - Portuguˆs " (
copy "\\addc\scripts$\Scripts GPO\UninstallSoftware\AdobeReader.exe" C:\
wmic product where "Name like '%%Adobe Acrobat%%'" call uninstall
start /wait C:\AdobeReader.exe /sAll
echo done >> C:\Admin\adobecheck.txt
del C:\AdobeReader.exe
goto :eof
) ELSE (
copy "\\addc\scripts$\Scripts GPO\UninstallSoftware\AdobeReader.exe" C:\
wmic product where "Name like '%%Adobe Acrobat%%'" call uninstall
start /wait C:\AdobeReader.exe /sAll
echo done >> C:\Admin\adobecheck.txt
del C:\AdobeReader.exe
goto :eof
)
:done
goto :eof
:Check
REM Verifica se o arquivo de controle existe, e caso exista lˆ o texto escrito nele para verificar em que passo estamos
if exist C:\Admin\adobecheck.txt (
set /p version=<C:\Admin\adobecheck.txt
) else (
mkdir C:\Admin
set version=install
)