From c6431e6628126ed7e739dcb9abb32d703c348238 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Tue, 25 Feb 2014 15:27:54 +0100 Subject: [PATCH] activate NetAdm --- CLIENT_DATA/setup3264.ins | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/CLIENT_DATA/setup3264.ins b/CLIENT_DATA/setup3264.ins index 7998c71..00acd9d 100644 --- a/CLIENT_DATA/setup3264.ins +++ b/CLIENT_DATA/setup3264.ins @@ -26,6 +26,7 @@ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ DefVar $Group$ +DefVar $NetGroup$ DefVar $openvpn_userpasswd$ DefVar $UserExists$ @@ -87,6 +88,12 @@ else set $Group$ = takeString(6,$ResultList$) set $Group$ = takeString(1,splitstring($Group$,"\")) + set $ResultList$ = getOutStreamFromSection("DosInAnIcon_get_netadmin_group") + + set $NetGroup$ = takeString(6,$ResultList$) + set $NetGroup$ = takeString(1,splitstring($NetGroup$,"\")) + + comment "Check if user exists." comment "If user exists, the password will be altered. Otherwise, the user will be created." set $ResultList2$ = getOutStreamFromSection("DosInAnIcon_checkuser") @@ -139,6 +146,10 @@ endif @echo off "%ScriptPath%\ALL\PsGetsid.exe" /accepteula S-1-5-32-544 +[DosInAnIcon_get_netadmin_group] +@echo off +"%ScriptPath%\ALL\PsGetsid.exe" /accepteula S-1-5-32-556 + [DosInAnIcon_checkuser] @echo off net user openvpn >nul 2>&1 && echo yes || echo no @@ -146,6 +157,7 @@ net user openvpn >nul 2>&1 && echo yes || echo no [DosInAnIcon_makeadmin] NET USER openvpn $openvpn_userpasswd$ /ADD /comment:"Local User created by OpenVPN opsi-package" /fullname:"Local User by Opsi OpenVPN" /passwordchg:no /passwordreq:yes /expires:never /active:yes NET LOCALGROUP $Group$ /ADD openvpn +NET LOCALGROUP $NetGroup$ /ADD openvpn [DosInAnIcon_alter_pw] NET USER openvpn $openvpn_userpasswd$ @@ -192,7 +204,7 @@ set_subfolder OpenVPN set_link name: OpenVPN GUI target: $InstallDir32$/CPAU.exe - parameters: -dec -file $InstallDir32$\openvpn.job + parameters: -dec -file "$InstallDir32$\openvpn.job" -lwp working_dir: $InstallDir32$ icon_file: $InstallDir32$\icon.ico icon_index: @@ -204,7 +216,7 @@ set_subfolder "" set_link name: OpenVPN GUI target: $InstallDir32$/CPAU.exe - parameters: -dec -file $InstallDir32$\openvpn.job + parameters: -dec -file "$InstallDir32$\openvpn.job" - lwp working_dir: $InstallDir32$ icon_file: $InstallDir32$\icon.ico icon_index: @@ -217,7 +229,7 @@ set_subfolder OpenVPN set_link name: OpenVPN GUI target: $InstallDir64$/CPAU.exe - parameters: -dec -file $InstallDir64$\openvpn.job -lwp + parameters: -dec -file "$InstallDir64$\openvpn.job" -lwp working_dir: $InstallDir64$ icon_file: $InstallDir64$\icon.ico icon_index: @@ -229,7 +241,7 @@ set_subfolder "" set_link name: OpenVPN GUI target: $InstallDir64$/CPAU.exe - parameters: -dec -file $InstallDir64$\openvpn.job -lwp + parameters: -dec -file "$InstallDir64$\openvpn.job" -lwp working_dir: $InstallDir64$ icon_file: $InstallDir64$\icon.ico icon_index: