activate NetAdm

This commit is contained in:
Mario Fetka 2014-02-25 15:27:54 +01:00
parent d3a4363aac
commit c6431e6628

View File

@ -26,6 +26,7 @@ DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$ DefVar $OLD_RELEASE$
DefVar $Group$ DefVar $Group$
DefVar $NetGroup$
DefVar $openvpn_userpasswd$ DefVar $openvpn_userpasswd$
DefVar $UserExists$ DefVar $UserExists$
@ -87,6 +88,12 @@ else
set $Group$ = takeString(6,$ResultList$) set $Group$ = takeString(6,$ResultList$)
set $Group$ = takeString(1,splitstring($Group$,"\")) 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 "Check if user exists."
comment "If user exists, the password will be altered. Otherwise, the user will be created." comment "If user exists, the password will be altered. Otherwise, the user will be created."
set $ResultList2$ = getOutStreamFromSection("DosInAnIcon_checkuser") set $ResultList2$ = getOutStreamFromSection("DosInAnIcon_checkuser")
@ -139,6 +146,10 @@ endif
@echo off @echo off
"%ScriptPath%\ALL\PsGetsid.exe" /accepteula S-1-5-32-544 "%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] [DosInAnIcon_checkuser]
@echo off @echo off
net user openvpn >nul 2>&1 && echo yes || echo no 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] [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 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 $Group$ /ADD openvpn
NET LOCALGROUP $NetGroup$ /ADD openvpn
[DosInAnIcon_alter_pw] [DosInAnIcon_alter_pw]
NET USER openvpn $openvpn_userpasswd$ NET USER openvpn $openvpn_userpasswd$
@ -192,7 +204,7 @@ set_subfolder OpenVPN
set_link set_link
name: OpenVPN GUI name: OpenVPN GUI
target: $InstallDir32$/CPAU.exe target: $InstallDir32$/CPAU.exe
parameters: -dec -file $InstallDir32$\openvpn.job parameters: -dec -file "$InstallDir32$\openvpn.job" -lwp
working_dir: $InstallDir32$ working_dir: $InstallDir32$
icon_file: $InstallDir32$\icon.ico icon_file: $InstallDir32$\icon.ico
icon_index: icon_index:
@ -204,7 +216,7 @@ set_subfolder ""
set_link set_link
name: OpenVPN GUI name: OpenVPN GUI
target: $InstallDir32$/CPAU.exe target: $InstallDir32$/CPAU.exe
parameters: -dec -file $InstallDir32$\openvpn.job parameters: -dec -file "$InstallDir32$\openvpn.job" - lwp
working_dir: $InstallDir32$ working_dir: $InstallDir32$
icon_file: $InstallDir32$\icon.ico icon_file: $InstallDir32$\icon.ico
icon_index: icon_index:
@ -217,7 +229,7 @@ set_subfolder OpenVPN
set_link set_link
name: OpenVPN GUI name: OpenVPN GUI
target: $InstallDir64$/CPAU.exe target: $InstallDir64$/CPAU.exe
parameters: -dec -file $InstallDir64$\openvpn.job -lwp parameters: -dec -file "$InstallDir64$\openvpn.job" -lwp
working_dir: $InstallDir64$ working_dir: $InstallDir64$
icon_file: $InstallDir64$\icon.ico icon_file: $InstallDir64$\icon.ico
icon_index: icon_index:
@ -229,7 +241,7 @@ set_subfolder ""
set_link set_link
name: OpenVPN GUI name: OpenVPN GUI
target: $InstallDir64$/CPAU.exe target: $InstallDir64$/CPAU.exe
parameters: -dec -file $InstallDir64$\openvpn.job -lwp parameters: -dec -file "$InstallDir64$\openvpn.job" -lwp
working_dir: $InstallDir64$ working_dir: $InstallDir64$
icon_file: $InstallDir64$\icon.ico icon_file: $InstallDir64$\icon.ico
icon_index: icon_index: