tis-ms-pstools 2.44-2

  • package : tis-ms-pstools
  • version : 2.44-2
  • description : PsTools
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2017-09-13 10:22:35
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170913-102235
  • min_os_version :
  • min_wapt_version :

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)

    

manifest

[["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "7ccbe65afd42ee7794a86ed74eef48e3f5812c93"], ["pstools/pssuspend.exe", "0dfcf31ad455abd48d35b0250b5b03265052fba6"], ["pstools64/Pstools.chm", "2fe7a164b987856721fe43eb174090cf69afad54"], ["pstools64/PsService.exe", "30496d2f60a2b10ae0da39e5adf107b3b43ccccd"], ["pstools64/PsExec.exe", "fb0a150601470195c47b4e8d87fcb3f50292beb2"], ["WAPT/control", "131df6dbbbaee3d325596b350818b8abe79e480c"], ["pstools64/pssuspend.exe", "3dfa82b8884d2bbc7b43f6f9787da51a38fa57b6"], ["pstools64/psfile.exe", "9a0fdfb801ab76eedbbd0e18430af72556a28d0d"], ["pstools/PsExec.exe", "e50d9e3bd91908e13a26b3e23edeaf577fb3a095"], ["pstools/pslist.exe", "fe41e35485d4c5b61ec555c1c38965f837759585"], ["pstools/psfile.exe", "3e99f3680b7e4ba4fade90fd338999b2ab4ca7f8"], ["pstools/psversion.txt", "f5ad734b9751d78faaa3f1da4ca3486d9283b5e1"], ["pstools/PsInfo.exe", "e839ce1e0446d8da889935f411f0fb7ad54d4b3e"], ["pstools64/PsLoggedon.exe", "1f5b5e40c420f64aa8e8de471367e3decc9763cd"], ["pstools/PsGetsid.exe", "b6687d012061ffbf7b5da11ecd54af312f584bd2"], ["pstools/psshutdown.exe", "1f0a68fa8abe3abbedb2d52b24fd805aeb90f2f1"], ["setup.py", "116fffe4ba9c5e592959e7c6a941f07010fbe7a1"], ["pstools/Pstools.chm", "2fe7a164b987856721fe43eb174090cf69afad54"], ["pstools64/PsGetsid.exe", "19c8339a33e2078387f944ddc7a3f462b725c957"], ["pstools/pspasswd.exe", "0618fec45eaee89cd4c7b17f77d9ff659eabe176"], ["pstools/PsService.exe", "0db6b656ab0505903bc47f47e63e3451a93f41e1"], ["pstools64/pspasswd.exe", "90994f647f8cfac2c448e6bb5371cc3dd0e4feb5"], ["pstools64/pskill.exe", "bc2cb97f09f70bd21225232a41af6206a62fa182"], ["pstools/pskill.exe", "5368cb7a466d559eb74c53040f719d823cbe4dfc"], ["pstools64/psshutdown.exe", "1f0a68fa8abe3abbedb2d52b24fd805aeb90f2f1"], ["pstools64/psloglist.exe", "4ba92a737f5aee970caafdca6b7ad0fb729eaf37"], ["pstools64/PsInfo.exe", "453c70e4b12ecabe860866165ad39de6361215fd"], ["pstools/PsLoggedon.exe", "f02e06bc439a28aad6dd957df8d0022f22798a09"], ["pstools64/pslist.exe", "bb9b442a7cee25a18811defb6e76433645b4f9ae"], ["pstools/psloglist.exe", "4ba92a737f5aee970caafdca6b7ad0fb729eaf37"], ["pstools64/psversion.txt", "f5ad734b9751d78faaa3f1da4ca3486d9283b5e1"]]