tis-ms-pstools 1-5

  • package : tis-ms-pstools
  • version : 1-5
  • description : PsTools
  • maintainer : TIS <technique@tranquil-it-systems.fr>
  • date : 2017-07-20 11:22:20
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170720-112220
  • 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')
    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")

    # accept EULA
    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)
    add_to_system_path(dest_dir)

    

manifest

[["pstools/PsLoggedon.exe", "a9b37af96190adfcf36fb6301b1e07da1c5c4443"], ["pstools/PsExec.exe", "cd23b7c9e0edef184930bc8e0ca2264f0608bcb3"], ["pstools/pslist.exe", "4273b7bd38fc1f203ccc5fdfa1f7331b2683f001"], ["pstools/PsService.exe", "67cdb998656f3a938ebea57fa0065fcb853ea6a0"], ["pstools/psfile.exe", "2dce99c39c59aad43d24cd6dd4f20d29d8326e55"], ["pstools/pssuspend.exe", "be4ca29e12587db61260b4357798ad26be814954"], ["pstools/psversion.txt", "f5ad734b9751d78faaa3f1da4ca3486d9283b5e1"], ["pstools/PsInfo.exe", "fddf011b81da0ee66fad2f1cdeb67e5eeef4e142"], ["pstools/psloglist.exe", "4ba92a737f5aee970caafdca6b7ad0fb729eaf37"], ["pstools/PsGetsid.exe", "48f5467cebea5b7be8ad5e243f92be026fab6f99"], ["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/control", "72af1b3896ef6f7231737d97a92ec813d3a09b64"], ["pstools/psshutdown.exe", "1f0a68fa8abe3abbedb2d52b24fd805aeb90f2f1"], ["pstools/pspasswd.exe", "727a26e0ad9f3e401a4d63ad5365e266917a3b6e"], ["setup.py", "8f60220ae276755835123169e3b894a42b1efaee"], ["pstools/pskill.exe", "445765bcaba554a63d4b7f466b8b6a7f973ca1df"], ["pstools/Pstools.chm", "28a1b4401459fa6301fc28556a3c0ace456c9d2c"], ["WAPT/wapt.psproj", "4e85d7af350c7aa022303492501577e1436625bd"]]