tis-bginfo 4.20-1

  • package : tis-bginfo
  • version : 4.20-1
  • description : automatic package for BGInfo (Sysinternals)
  • maintainer : Administrateur
  • date : 2017-07-20 11:19:14
  • signer : TRANQUIL IT SYSTEMS
  • signature_date : 20170720-111914
  • min_os_version :
  • min_wapt_version :

setup.py

# -*- coding: utf-8 -*-
from setuphelpers import *

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

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

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

destdir = makepath(programfiles32,'bginfo')
exefile = makepath(destdir,'bginfo.exe')

def install():
    # if you want to modify the keys depending on environment (win32/win64... params..)
    global uninstallkey
    global uninstallstring

    run("reg add HKU\.DEFAULT\Software\Sysinternals\BGInfo /v EulaAccepted /t REG_DWORD /d 1 /f")

    default_startup_menu = startup(common=1)
    print('Installing bginfo')
    copytree2('bginfo',destdir,onreplace=default_overwrite_older)
    #create_programs_menu_shortcut('BgInfo',exefile)
    link_file_name = os.path.join(default_startup_menu,"bginfo.lnk")
    target_path = os.path.join(destdir,"bginfo.exe")
    target_arguments =  '"' + os.path.join(destdir,"tis-default.bgi") + '" /timer:0 /nolicprompt'
    print target_path
    import winshell
    winshell.CreateShortcut(link_file_name,target_path,Arguments =target_arguments)

    #create_shortcut(link_file_name, target = target_path)
    #create_shortcut()

    print "Registering uninstall"
    register_uninstall('bginfo','c:\\wapt\\wapt-get.exe uninstall tis-bginfo',False,quiet_uninstall_string='',
        install_location = destdir,display_name='BG Info',
        display_version = get_file_properties(exefile)['FileVersion'],publisher = 'SysInternals')

def uninstall():
    print "Remove start link"
    #remove_file(makepath(start_menu(1),'sqliteadmin.lnk'))
    print "Remove directory content %s" % destdir
    remove_tree(destdir)
    print "Unregister app from registry"
    unregister_uninstall('bginfo',False)
    print "Uninstall successsful"

#def session_setup():
#    create_user_desktop_shortcut('SqliteAdmin',makepath(destdir,'sqliteadmin.exe'))

    

manifest

[["WAPT/certificate.crt", "0db563dc9077b268ca07ba834322d0fc5e21f8e5"], ["WAPT/wapt.psproj", "cb00c5b7c58cc65d54109e7b64d1121a0b021edd"], ["bginfo/tis-default.bgi", "e724fd9afe29ac16f4dcacadfc4104a9f3153e00"], ["bginfo/Bginfo.exe", "1cee3fa8419bdf4cbc266461277e3fdd9b93de25"], ["setup.py", "cbd1d3a6bcfa51907f70ecc0aa07d0ae89239bcf"], ["WAPT/control", "b84dba1cac675d063666939d69b8bb53db28eb1b"]]