Changes

OpenVPN

6,206 bytes added, 18:59, 26 June 2020
Alternative installation by Dave
[http://www.dualsoft.net/majstorije/?p=6 DriverSigning-On/Off tool] or direct link [http://www.boot-land.net/forums/index.php?act=attach&type=post&id=4073 DriverSigning.zip] (you have to register on forum). This tool removes the window that pops-up when unsigned driver installation is required. OpenVPN installs the TAP driver interface.
''If you can't find it there, try: http://bit.ly/jlpBO9 or [http://reboot.pro/topic/3095-how-to-circumvent-driver-signing-policy-elevation/?p=27510 here]''
 
==Alternative installation by Dave==
 
we do not need to install a certificate on Win 10 for TAP as the driver for Win10 is (now?) Microsoft signed.
https://github.com/OpenVPN/tap-windows6/pull/100
 
* add dummy file to avoid "No readable connection profiles found".
* create OpenVPN Administrators group and add "Authenticated Users" to avoid prompt Admin prompt to create group on first run.
* handle upgrades and removal even if OpenVPN services are already running.
 
<source lang="xml">
<package
id="openvpn"
name="OpenVPN Client"
revision="%version%"
reboot="false"
priority="10">
 
<variable name="version" value="2.4.9-I601-Win10" />
 
<!-- check the version no. to check the package state -->
<check type="uninstall" condition="versiongreaterorequal" path="OpenVPN .*" value="%version%" />
 
<!--
https://github.com/OpenVPN/openvpn-build/blob/c92af79befec86f21b257b5defba0becb3d7641f/windows-nsis/openvpn.nsi#L551
This package considers the following upstream parameters. By default, when not specified, they are considered as being set to 1.
/SELECT_OPENVPN: Install OpenVPN user-space components, including openvpn.exe.
/SELECT_OPENVPNGUI: Install OpenVPN GUI by Mathias Sundman.
/SELECT_TAP: Install/upgrade the TAP virtual device driver.
/SELECT_EASYRSA: Install OpenVPN RSA scripts for X509 certificate management. Might need to set this to 0
/SELECT_OPENSSLDLLS: Install OpenSSL DLLs locally (may be omitted if DLLs are already installed globally).
/SELECT_LZODLLS: Install LZO DLLs locally (may be omitted if DLLs are already installed globally).
/SELECT_PKCS11DLLS: Install PKCS#11 helper DLLs locally (may be omitted if DLLs are already installed globally).
/SELECT_SERVICE: Install the OpenVPN service wrappers.
/SELECT_OPENSSL_UTILITIES: Install the OpenSSL Utilities (used for generating public/private key pairs).
/SELECT_PATH: Add OpenVPN executable directory to the current user's PATH.
/SELECT_SHORTCUTS: Add OpenVPN shortcuts to the current user's desktop and start menu.
/SELECT_ASSOCIATIONS: Register OpenVPN config file association (*.ovpn).
/SELECT_LAUNCH: Launch OpenVPN GUI on user logon.
 
we do not need to install a certificate on Win 10 for TAP as the driver for Win10 is now Microsoft signed.
https://github.com/OpenVPN/tap-windows6/pull/100
-->
 
<!-- install the software, timeout 120s, install/upgrade TAP driver -->
<install timeout="120" cmd='"%SOFTWARE%\openvpn\openvpn-install-%version%.exe" /S /SELECT_TAP=1' />
<!-- add dummy file to suppress "No readable connection profiles found" /Y to overwrite if exists,
ideally we'll delete this when the user has a useable profile set up, but it does no harm -->
<install cmd='%COMSPEC% /C COPY /Y "%SOFTWARE%\openvpn\dummy-ignore.ovpn" "%ProgramFiles%\OpenVPN\config\"' />
<!-- make sure the group exists, so users are allowed to import configs -->
<install cmd='%COMSPEC% /C net localgroup | find /i "OpenVPN Administrators" || net localgroup "OpenVPN Administrators" /ADD' > <exit code="any" /> </install>
<install cmd='%COMSPEC% /C net localgroup "OpenVPN Administrators" | find /i "Authenticated Users" || net localgroup "OpenVPN Administrators" "Authenticated Users" /ADD' />
<!-- and remove the desktop icon -->
<install cmd='%COMSPEC% /C if exist "%public%\Desktop\OpenVPN GUI.lnk" del "%public%\Desktop\OpenVPN GUI.lnk"' />
<install cmd='%SystemRoot%\System32\msg.exe * OpenVPN has been installed, in order for it to work properly you will need to restart your computer'/>
 
<!-- stop any services prior to upgrade -->
<upgrade cmd='net stop "OpenVPN Interactive Service"' > <exit code="any" /> </upgrade>
<upgrade cmd='net stop "OpenVPN Legacy Service"' > <exit code="any" /> </upgrade>
<upgrade cmd='net stop "OpenVPNService"' > <exit code="any" /> </upgrade>
<!-- and stop any tasks -->
<upgrade cmd="taskkill /F /IM openvpnserv.exe"> <exit code="any" /> </upgrade>
<upgrade cmd="taskkill /F /IM openvpn-gui.exe"> <exit code="any" /> </upgrade>
<upgrade cmd="taskkill /F /IM openvpn.exe"> <exit code="any" /> </upgrade>
<!-- install the software, timeout 120s, install/upgrade TAP driver -->
<upgrade timeout="120" cmd='"%SOFTWARE%\openvpn\openvpn-install-%version%.exe" /S /SELECT_TAP=1' />
<!-- and remove the desktop icon -->
<upgrade cmd='%COMSPEC% /C if exist "%public%\Desktop\OpenVPN GUI.lnk" del "%public%\Desktop\OpenVPN GUI.lnk"' />
<!-- and then start the services again -->
<upgrade cmd='net start "OpenVPNService"' > <exit code="any" /> </upgrade>
<upgrade cmd='net start "OpenVPN Interactive Service"' > <exit code="any" /> </upgrade>
<!-- the GUI must be started by the user -->
<upgrade cmd='%SystemRoot%\System32\msg.exe * In order to upgrade OpenVPN we needed to shut it down, you can start it again by running [OpenVPN GUI] or by restarting your computer'/>
 
<downgrade include="remove" />
<downgrade include="install" />
 
<!-- stop any services -->
<remove cmd='net stop "OpenVPN Interactive Service"' > <exit code="any" /> </remove>
<remove cmd='net stop "OpenVPN Legacy Service"' > <exit code="any" /> </remove>
<remove cmd='net stop "OpenVPNService"' > <exit code="any" /> </remove>
<!-- and stop any tasks -->
<remove cmd="taskkill /F /IM openvpnserv.exe"> <exit code="any" /> </remove>
<remove cmd="taskkill /F /IM openvpn-gui.exe"> <exit code="any" /> </remove>
<remove cmd="taskkill /F /IM openvpn.exe"> <exit code="any" /> </remove>
<!-- remove any common config files -->
<remove cmd='%COMSPEC% /C if exist "%ProgramFiles%\OpenVPN\config\*.ovpn" del /F "%ProgramFiles%\OpenVPN\config\*.ovpn"' > <exit code="any" /> </remove>
<!-- run the NSIS uninstaller, should remove TAP as well -->
<remove cmd='"%ProgramFiles%\OpenVPN\Uninstall.exe" /S' > <exit code="any" /> </remove>
<!-- remove folder if it didn't get wiped -->
<remove cmd='%COMSPEC% /C if exist "%ProgramFiles%\OpenVPN" rmdir /s /q "%ProgramFiles%\OpenVPN"' />
 
</package>
</source>
 
dummy file '''dummy-ignore.ovpn''' just contains:
<source>
# dummy file to suppress the prompt
</source>
 
==Alternative installation by Vince==
12
edits