w10install/optional/install-emclient.cmd

44 lines
1.1 KiB
Batchfile
Raw Normal View History

2021-01-12 22:04:21 +01:00
@echo off
2021-03-06 16:23:00 +01:00
set OPT=..\optional
2021-01-12 22:04:21 +01:00
set SOFTWARE=..\software
2021-02-27 20:07:28 +01:00
set MSI=emclient-setup.msi
set EMSERVERIP=168.62.48.183
2021-01-12 22:04:21 +01:00
2021-02-27 20:07:28 +01:00
if NOT EXIST %SOFTWARE%\%MSI% (
echo ERROR: %SOFTWARE%\%MSI% not found!
exit /b
)
2021-01-12 22:04:21 +01:00
echo ####### %0 #######
2022-05-16 08:14:21 +02:00
echo installing em-Client ...
2021-01-12 22:04:21 +01:00
cd %SOFTWARE%
@echo on
2021-02-28 14:10:59 +01:00
msiexec /i %MSI% /quiet
2021-01-12 22:04:21 +01:00
@echo off
2021-03-06 16:23:00 +01:00
cd %OPT%
2021-01-12 22:04:21 +01:00
echo removing autostart for em-Client ...
2021-02-28 14:10:59 +01:00
reg delete "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" ^
/v "eM Client" /f
2021-02-13 10:46:20 +01:00
2021-03-02 14:21:58 +01:00
taskkill /F /IM SystemSettings.exe 2>nul
2021-02-28 22:53:42 +01:00
echo copying link to desktop ...
copy /Y "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\eM Client.lnk" ^
%PUBLIC%\Desktop
echo refreshing desktop ...
2021-03-06 16:23:00 +01:00
ie4uinit.exe -show
echo disabling automatic updates via W10 firewall ...
netsh advfirewall firewall delete rule name="block_emclient_updates" 2>nul
netsh advfirewall firewall add rule name="block_emclient_updates" ^
dir=out action=block protocol=tcp localip=any remoteip=%EMSERVERIP% ^
remoteport=80,443 program="%ProgramFiles(x86)%\eM Client\MailClient.exe"
2021-01-12 22:04:21 +01:00
echo ####### %0 #######
2021-03-02 21:47:42 +01:00
pause