w10install/optional/install-openvpn.cmd

40 lines
776 B
Batchfile
Raw Normal View History

2022-11-13 22:12:39 +01:00
@echo off
call check-for-admin
if %ERRORLEVEL% neq 0 exit /b
2022-11-13 22:12:39 +01:00
set OPT=..\optional
set SOFTWARE=..\software
set MSI=openvpn-setup.msi
2024-07-17 23:47:51 +02:00
set STARTMENU="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs"
2022-11-13 22:12:39 +01:00
if NOT EXIST %SOFTWARE%\%MSI% (
echo ERROR: %SOFTWARE%\%MSI% not found!
exit /b
)
echo ####### %0 #######
echo installing OpenVPN ...
cd %SOFTWARE%
@echo on
msiexec /i %MSI% /q
@echo off
cd %OPT%
2024-07-17 23:47:51 +02:00
echo moving OpenVPN startmenu shortcut ...
move /Y %STARTMENU%\"OpenVPN\OpenVPN GUI.lnk" %STARTMENU%\OpenVPN.lnk
echo removing Inkscape startmenu folder ...
rd /S /Q %STARTMENU%\"OpenVPN" 2>nul
2022-11-13 22:12:39 +01:00
echo removing Desktop icon ...
2024-07-17 23:47:51 +02:00
del /F /Q "%PUBLIC%\Desktop\OpenVPN GUI.lnk" 2>nul
2022-11-13 22:12:39 +01:00
echo refreshing desktop (W10 style) ...
ie4uinit.exe -show
echo ####### %0 #######
pause