From f13d8d3d4028793eabefb50cdcbf1724bd0ce4e6 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 8 Mar 2014 21:37:57 +0100 Subject: [PATCH] remoove the dumb workaround and remove the menu entries and desktop icon openvpn manager is working better --- CLIENT_DATA/delsub3264.ins | 19 ------ CLIENT_DATA/setup3264.ins | 118 +++------------------------------- CLIENT_DATA/uninstall3264.ins | 12 +--- CPAU-2.3.2.zip.sha1sum | 1 - PSTools-2.3.2.zip.sha1sum | 1 - builder-product.cfg | 10 --- builder-targets-cb.sh | 7 -- 7 files changed, 10 insertions(+), 158 deletions(-) delete mode 100644 CPAU-2.3.2.zip.sha1sum delete mode 100644 PSTools-2.3.2.zip.sha1sum diff --git a/CLIENT_DATA/delsub3264.ins b/CLIENT_DATA/delsub3264.ins index e962fbe..dc2993c 100644 --- a/CLIENT_DATA/delsub3264.ins +++ b/CLIENT_DATA/delsub3264.ins @@ -71,25 +71,6 @@ endif comment "Delete program shortcuts" LinkFolder_uninstall -comment "Check if user exists." -set $ResultList2$ = getOutStreamFromSection("DosInAnIcon_checkuser") -set $UserExists$ = takeString(0,$ResultList2$) -set $UserExists$ = takeString(0,splitstring($UserExists$," ")) - -if $UserExists$ = "yes" - DosInAnIcon_deleteuser -;else -; LogError "User 'openvpn' does not exist!" -; isFatalError -endif - -[DosInAnIcon_checkuser] -@echo off -net user openvpn >nul 2>&1 && echo yes || echo no - -[DosInAnIcon_deleteuser] -NET USER openvpn /DELETE - [Winbatch_uninstall_old_32] "$UninstallProgramOld32$" /S diff --git a/CLIENT_DATA/setup3264.ins b/CLIENT_DATA/setup3264.ins index 00acd9d..7e61649 100644 --- a/CLIENT_DATA/setup3264.ins +++ b/CLIENT_DATA/setup3264.ins @@ -25,18 +25,8 @@ DefVar $OLD_VERSION$ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ -DefVar $Group$ -DefVar $NetGroup$ -DefVar $openvpn_userpasswd$ -DefVar $UserExists$ - -DefStringlist $ResultList$ -DefStringlist $ResultList2$ - Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") -Set $openvpn_userpasswd$ = RandomStr - Set $LogDir$ = "%SystemDrive%\tmp" @@ -81,35 +71,6 @@ else Winbatch_install_cert Sub_check_exitcode - comment "get the name of the admin group" - comment "using psgetsid from sysinernals pstools" - set $ResultList$ = getOutStreamFromSection("DosInAnIcon_get_admin_group") - - 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") - set $UserExists$ = takeString(0,$ResultList2$) - - setLogLevel=0 - - comment "create our local user" - if $UserExists$ = "no" - DosInAnIcon_makeadmin - else - DosInAnIcon_alter_pw - endif - - setLogLevel=3 - comment "installing" if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") @@ -123,7 +84,7 @@ else comment "Patch Registry" Registry_install /32Bit comment "Create shortcuts" - LinkFolder_install_32 + LinkFolder_install endif if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) @@ -137,37 +98,16 @@ else comment "Patch Registry" Registry_install /64Bit comment "Create shortcuts" - LinkFolder_install_64 + LinkFolder_install endif endif -[DosInAnIcon_get_admin_group] -@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 - -[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$ - [Winbatch_install_cert] -certutil -addstore "TrustedPublisher" "%ScriptPath%\OpenVPN-Certificate.cer" +certutil -addstore "TrustedPublisher" "%ScriptPath%\OpenVPN Certificate.cer" [Winbatch_install_32] "$Install32Exe$" /S -"%ScriptPath%\ALL\CPAU.exe" -u openvpn -p $openvpn_userpasswd$ -ex "$InstallDir32$\bin\openvpn-gui.exe" -enc -file "$InstallDir32$\openvpn.job" -crc "$InstallDir32$\bin\openvpn-gui.exe" [Files_install_32] ; copy the ini file to the InstallDir @@ -175,11 +115,10 @@ copy "$IniCfgFile$" "$InstallDir32$" ; Example of recursively copying some files into the installation directory: ; -copy -s "%ScriptPath%\ALL\CPAU.exe" "$InstallDir32$" +; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" [Winbatch_install_64] "$Install64Exe$" /S -"%ScriptPath%\ALL\CPAU.exe" -u openvpn -p $openvpn_userpasswd$ -ex "$InstallDir64$\bin\openvpn-gui.exe" -enc -file "$InstallDir64$\openvpn.job" -crc "$InstallDir64$\bin\openvpn-gui.exe" [Files_install_64] ; copy the ini file to the InstallDir @@ -187,7 +126,7 @@ copy "$IniCfgFile$" "$InstallDir64$" ; Example of recursively copying some files into the installation directory: ; -copy -s "%ScriptPath%\ALL\CPAU.exe" "$InstallDir64$" +; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" [Registry_install] ; Example of setting some values of an registry key: @@ -197,55 +136,14 @@ copy -s "%ScriptPath%\ALL\CPAU.exe" "$InstallDir64$" ; set "name2" = REG_DWORD:0001 ; set "name3" = REG_BINARY:00 af 99 cd -[LinkFolder_install_32] +[LinkFolder_install] set_basefolder common_programs -set_subfolder OpenVPN - -set_link - name: OpenVPN GUI - target: $InstallDir32$/CPAU.exe - parameters: -dec -file "$InstallDir32$\openvpn.job" -lwp - working_dir: $InstallDir32$ - icon_file: $InstallDir32$\icon.ico - icon_index: -end_link +delete_subfolder OpenVPN set_basefolder common_desktopdirectory set_subfolder "" +delete_element "OpenVPN GUI" -set_link - name: OpenVPN GUI - target: $InstallDir32$/CPAU.exe - parameters: -dec -file "$InstallDir32$\openvpn.job" - lwp - working_dir: $InstallDir32$ - icon_file: $InstallDir32$\icon.ico - icon_index: -end_link - -[LinkFolder_install_64] -set_basefolder common_programs -set_subfolder OpenVPN - -set_link - name: OpenVPN GUI - target: $InstallDir64$/CPAU.exe - parameters: -dec -file "$InstallDir64$\openvpn.job" -lwp - working_dir: $InstallDir64$ - icon_file: $InstallDir64$\icon.ico - icon_index: -end_link - -set_basefolder common_desktopdirectory -set_subfolder "" - -set_link - name: OpenVPN GUI - target: $InstallDir64$/CPAU.exe - parameters: -dec -file "$InstallDir64$\openvpn.job" -lwp - working_dir: $InstallDir64$ - icon_file: $InstallDir64$\icon.ico - icon_index: -end_link [Sub_check_exitcode] comment "Test for installation success via exit code" diff --git a/CLIENT_DATA/uninstall3264.ins b/CLIENT_DATA/uninstall3264.ins index 59c1e77..3be6a71 100644 --- a/CLIENT_DATA/uninstall3264.ins +++ b/CLIENT_DATA/uninstall3264.ins @@ -6,9 +6,11 @@ [Actions] requiredWinstVersion >= "4.11.2.6" +DefVar $UninstallProg32$ DefVar $UninstallProgram32$ DefVar $UninstallProgramOld32$ DefVar $IniFile32$ +DefVar $UninstallProg64$ DefVar $UninstallProgram64$ DefVar $UninstallProgramOld64$ DefVar $IniFile64$ @@ -24,10 +26,6 @@ DefVar $OLD_VERSION$ DefVar $OLD_CREATOR_TAG$ DefVar $OLD_RELEASE$ -DefVar $Group$ -DefVar $UserExists$ -DefStringlist $ResultList2$ - Set $INST_SystemType$ = GetSystemType set $INST_architecture$ = GetProductProperty("install_architecture","system specific") @@ -62,9 +60,3 @@ if FileExists("%ScriptPath%\delsub3264.ins") Sub "%ScriptPath%\delsub3264.ins" endif -[DosInAnIcon_checkuser] -@echo off -net user openvpn >nul 2>&1 && echo yes || echo no - -[DosInAnIcon_deleteuser] -NET USER openvpn /DELETE diff --git a/CPAU-2.3.2.zip.sha1sum b/CPAU-2.3.2.zip.sha1sum deleted file mode 100644 index 6b25c97..0000000 --- a/CPAU-2.3.2.zip.sha1sum +++ /dev/null @@ -1 +0,0 @@ -6276607c6c3c59c2e00de8196c55192d8a50c61b /home/mario/.opsi-dist-cache/openvpn.openvpn-2.3.2/ALL/CPAU-2.3.2.zip diff --git a/PSTools-2.3.2.zip.sha1sum b/PSTools-2.3.2.zip.sha1sum deleted file mode 100644 index 425241a..0000000 --- a/PSTools-2.3.2.zip.sha1sum +++ /dev/null @@ -1 +0,0 @@ -c23826f8c056c1641eac698f5937615f8d6e1f47 /home/mario/.opsi-dist-cache/openvpn.openvpn-2.3.2/RUN/PSTools-2.3.2.zip diff --git a/builder-product.cfg b/builder-product.cfg index d96bcb8..2f7f5b5 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -32,16 +32,6 @@ DL_SOURCE[3]="http://nativeex.boot-land.net/Programs/DriverSigning/DriverSigning DL_ARCH[3]="X86" DL_WINST_NAME[3]=Driversigning32Exe -DL_FILE[4]="CPAU-${VERSION}.zip" -DL_SOURCE[4]="http://www.joeware.net/downloads/dl.php" -DL_ARCH[4]="ALL" -DL_EXTRACT_FORMAT[4]="unzip" - -DL_FILE[5]="PSTools-${VERSION}.zip" -DL_SOURCE[5]="http://download.sysinternals.com/files/PSTools.zip" -DL_ARCH[5]="ALL" -DL_EXTRACT_FORMAT[5]="unzip" - # File array index for the image showing while installing the program ICON_DL_INDEX=0 diff --git a/builder-targets-cb.sh b/builder-targets-cb.sh index 0d5a3a9..9a3d4a8 100644 --- a/builder-targets-cb.sh +++ b/builder-targets-cb.sh @@ -23,10 +23,3 @@ function cleanup() { echo "Cleanup" builder_cleanup } - -function create() { - echo "Create" - builder_create - - find $INST_DIR/CLIENT_DATA/ALL/ -type f ! -name 'PsGet*' ! -name 'CPAU*' -delete -}