tis-ms-pstools 2.44-2

  • package : tis-ms-pstools
  • version : 2.44-2
  • description : PsTools
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2018-02-27 19:04:10

setup.py

#!/usr/bin/python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
#    This file is part of WAPT
#    Copyright (C) 2013  Tranquil IT Systems http://www.tranquil.it
#    WAPT aims to help Windows systems administrators to deploy
#    setup and update applications on users PC.
#
#    WAPT is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    WAPT is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with WAPT.  If not, see <http://www.gnu.org/licenses/>.
#
# -----------------------------------------------------------------------
from setuphelpers import *
import os

# registry key(s) where WAPT will find how to remove the application(s)
uninstallkey = []

# command(s) to launch to remove the application(s)
uninstallstring = []

# list of required parameters names (string) which can be used during install
required_params = []

def install():
    dest_dir=makepath(programfiles32,'mspstools')
    dest_dir64=makepath(programfiles,'mspstools')

    if iswin64():
        if not isdir(dest_dir64): mkdirs(dest_dir64)
        for file_name64 in glob.glob(makepath('pstools64','*')):
            filecopyto(file_name64,dest_dir64)
        tool_list64 = ('PsExec',"psfile","psgetsid","psinfo","pskill","pslist","psloggedon","psloglist","pspasswd","psservice","psshutdown","pssuspend")
        add_to_system_path(dest_dir64)
        remove_from_system_path(dest_dir)
    else:
        if not isdir(dest_dir):
            mkdirs(dest_dir)
        for file_name in glob.glob(makepath('pstools','*')):
            filecopyto(file_name,dest_dir)
        tool_list = ('PsExec',"psfile","psgetsid","psinfo","pskill","pslist","psloggedon","psloglist","pspasswd","psservice","psshutdown","pssuspend")
        add_to_system_path(dest_dir)

    # accept EULA
    if iswin64():
        for sys_internal_reg_path in ( r"Software\Wow6432Node\Sysinternals\\",r"Software\Sysinternals\\"):
            for tool_name in tool_list64:
                for sid in ('.DEFAULT','S-1-5-18','S-1-5-19','S-1-5-20'):
                    key=reg_openkey_noredir(HKEY_USERS,r'%s\%s\%s' % (sid,sys_internal_reg_path, tool_name),sam=KEY_WRITE,create_if_missing=True)
                    if key:
                        reg_setvalue(key,'EulaAccepted',1,REG_DWORD)
                key=reg_openkey_noredir(HKEY_CURRENT_USER,r'%s\%s' % (sys_internal_reg_path, tool_name),sam=KEY_WRITE,create_if_missing=True)
                if key:
                    reg_setvalue(key,'EulaAccepted',1,REG_DWORD)
    else:
        for sys_internal_reg_path in ( r"Software\Wow6432Node\Sysinternals\\",r"Software\Sysinternals\\"):
            for tool_name in tool_list:
                for sid in ('.DEFAULT','S-1-5-18','S-1-5-19','S-1-5-20'):
                    key=reg_openkey_noredir(HKEY_USERS,r'%s\%s\%s' % (sid,sys_internal_reg_path, tool_name),sam=KEY_WRITE,create_if_missing=True)
                    if key:
                        reg_setvalue(key,'EulaAccepted',1,REG_DWORD)
                key=reg_openkey_noredir(HKEY_CURRENT_USER,r'%s\%s' % (sys_internal_reg_path, tool_name),sam=KEY_WRITE,create_if_missing=True)
                if key:
                    reg_setvalue(key,'EulaAccepted',1,REG_DWORD)

    

Changelog

No changelog
    

manifest.sha256

[["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "c5a1697bf6e134989a9870764995725626a8f5055b640e541b569d1a927363fc"], ["pstools/pssuspend.exe", "02ec8c37dd946a2cd74673993c2108f12fff3e82019a1590231c4205ccb2f0d4"], ["pstools64/Pstools.chm", "2813b6c07d17d25670163e0f66453b42d2f157bf2e42007806ebc6bb9d114acc"], ["pstools64/PsService.exe", "6de3137b3088b2c2c311a540f9aaeb57e9fd38259cb18875f2380ee74ec1c7af"], ["pstools64/PsExec.exe", "ad6b98c01ee849874e4b4502c3d7853196f6044240d3271e4ab3fc6e3c08e9a4"], ["WAPT/control", "6a1d5ec6abd821f3ec1e569a02888329e6383593c15e3a1c21fb983c20ee3dfd"], ["pstools64/pssuspend.exe", "e93ddd9ed564b7f6532cd5b94cdce73067d8ebad8a5ce9373a6f839c7050780f"], ["pstools64/psfile.exe", "033b81744e0bd4219a4d698894b8403bb67b525c96049cbfef34677d4d6fc85c"], ["pstools/PsExec.exe", "3337e3875b05e0bfba69ab926532e3f179e8cfbf162ebb60ce58a0281437a7ef"], ["pstools/pslist.exe", "9927831e111ac61fd7645bf7efa1787db1a3e85b6f64a274ca04b213dc27fd08"], ["pstools/psfile.exe", "9d45453285ff3b4a41056317c96866d06481751307d703e3355b18d5eeb092ad"], ["pstools/psversion.txt", "208469d3238653cc03607c08cdb4b5278ec1fde1c543b11cc3ae43a8a0e77a20"], ["pstools/PsInfo.exe", "8f401dc021e20ff3abc64a2d346ef6a792a5643ca04ffd1f297e417532acaa06"], ["pstools64/PsLoggedon.exe", "fdadb6e15c52c41a31e3c22659dd490d5b616e017d1b1aa6070008ce09ed27ea"], ["pstools/PsGetsid.exe", "d5c50620a1391b1f1797fd00a4bb93f5f1c64c9956e6d0882709b64a5facc435"], ["pstools/psshutdown.exe", "66885c2b1773a6d02c3937e67b94b786fc64af17a7e8bad050be5149092a0117"], ["setup.py", "54c0f9c001bdf4cd9efa6b92ce78035cae03887aca1fdc26927cae7c99ad7a69"], ["pstools/Pstools.chm", "2813b6c07d17d25670163e0f66453b42d2f157bf2e42007806ebc6bb9d114acc"], ["pstools64/PsGetsid.exe", "ba4327d879c7e306964100a3bd09d0c201c318e0b30ccc4b5994deb1a9df1df9"], ["pstools/pspasswd.exe", "b2f17ab6396a5e5cd5be12f658c22cdfa2071d377cb8bd0ee76abbf82a9240a7"], ["pstools/PsService.exe", "9454ba56bcb470d330559573afbc10f6989ba46f3e656c20979de6f92e051752"], ["pstools64/pspasswd.exe", "b5a01628e544929e2dff9f7041359d80f037e1e6da8afb97abd6b2b2f67960c4"], ["pstools64/pskill.exe", "75899c5ace600406503a937ef550ab0bbd0f6e0188b9e93e206beb1dfc79bb81"], ["pstools/pskill.exe", "546ec58d0134ea64611e12d7e3a867793e8cb6145ac18745349408a60fc2fabe"], ["pstools64/psshutdown.exe", "66885c2b1773a6d02c3937e67b94b786fc64af17a7e8bad050be5149092a0117"], ["pstools64/psloglist.exe", "08a635a6e94423c6404215adfd60a5d48dd0743b0b8f6cea143f738d053d501e"], ["pstools64/PsInfo.exe", "ef5cf80c8448bf0907c634a3251cc348b1d36bb5ad8f31f23b11d12aa7f63bcb"], ["pstools/PsLoggedon.exe", "d689cb1dbd2e4c06cd15e51a6871c406c595790ddcdcd7dc8d0401c7183720ef"], ["pstools64/pslist.exe", "e6901e8423da3e54bab25f7c90f60d3979bfa5bb61bcc46059662736253b8c72"], ["pstools/psloglist.exe", "08a635a6e94423c6404215adfd60a5d48dd0743b0b8f6cea143f738d053d501e"], ["pstools64/psversion.txt", "208469d3238653cc03607c08cdb4b5278ec1fde1c543b11cc3ae43a8a0e77a20"]]
    

Forum feed

WAPT Packages / Paquets WAPT • Re: Possibilité ignorer erreur de version ?
Dans votre cas le test n'est pas bon

Le but de la manœuvre est d'indiquer a wapt de ne pas aller chercher la version du logiciel dans uninstallkey du logiciel mais ailleur.

get_version sert a indiquer a wapt le numéro de version du logiciel.

exemple avec le logiciel naps :

CODE :

       def versnaps2(key):                return key['name'].replace('NAPS2 ','')        install_exe_if_needed('naps2-5.3.3-setup.exe',silentflags='/VERYSILENT',key='NAPS2 (Not Another PDF Scanner 2)_is1',get_version=versnaps2)        
on indique a wapt d'aller récupérer la version dans le nom du logiciel.

Dans votre code, vous allez récupérer le numéro de version dans le fichier msi qui est dans le paquet, ce n'est pas logique.

Pour résoudre votre problématique vous pouvez aussi modifier tout simplement modifier le min_version en appelant install_msi_if... plutôt que d'utiliser get_version

https://github.com/tranquilit/WAPT/blob ... s.py#L3815

Statistiques: Posté par sfonteneau — 18 juillet 2018, 22:56