tis-ms-pstools 1-5

  • package : tis-ms-pstools
  • version : 1-5
  • 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')
    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)

    

Changelog

No changelog
    

manifest.sha256

[["pstools/PsLoggedon.exe", "40c2d8d7e58dc4e0af897a6cf6e662a6be914c93d5ec5b6db570e5f4855e4e78"], ["pstools/PsExec.exe", "f8dbabdfa03068130c277ce49c60e35c029ff29d9e3c74c362521f3fb02670d5"], ["pstools/pslist.exe", "09174bf3dc391920cc89760d3d1933a0d41e573111897b0eb3c8472758fddbe5"], ["pstools/PsService.exe", "6baa38a5709dd9ff3d2c13c5ebbb38fa49594595f06b8376e4003415ea246c06"], ["pstools/psfile.exe", "d7961cece831d70f4040438b1e7bcf48973a7d9fbedcbd7aa58bc1d2dffc0623"], ["pstools/pssuspend.exe", "e47fade3db7bd4b30e8e7f7372694d2f3764d56d069e2a65e9e4f147396f26ca"], ["pstools/psversion.txt", "208469d3238653cc03607c08cdb4b5278ec1fde1c543b11cc3ae43a8a0e77a20"], ["pstools/PsInfo.exe", "058a6d07317ff862e2592e4ba94dab5c21452dbb4954fabdd8de200c5a5aaa31"], ["pstools/psloglist.exe", "08a635a6e94423c6404215adfd60a5d48dd0743b0b8f6cea143f738d053d501e"], ["pstools/PsGetsid.exe", "8177dd5c23d016ef12a72ffffedca32dd6fe8813cdc2ab0ee1cf8801de771587"], ["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/control", "785f90b15bff83c1e2b6231ac6dde89d8eaa079e8bc9898a27cdf669f75dfa58"], ["pstools/psshutdown.exe", "66885c2b1773a6d02c3937e67b94b786fc64af17a7e8bad050be5149092a0117"], ["pstools/pspasswd.exe", "ede2a07eae948b0255811e5a0952c2f42b4ab53fc2257cfa63d70b3a95bd9ece"], ["setup.py", "08d181219966eb688a4b9c398325ed2224ea0a0e59ab955774717cf0b7be98f4"], ["pstools/pskill.exe", "ed8f3c368ba229043c8acef7ae4f4a0fde62bf39fce51522916b7dce1e837f71"], ["pstools/Pstools.chm", "aa0ff7cc2486de77c9d4de54c18bc76bab085914028a80e06f6ea1609ea9a7a7"], ["WAPT/wapt.psproj", "798d3fe459b24e0460ace5be62ed6f6a46b3628442db63889ed4697c27047eb6"]]