tis-bginfo 4.20-1

  • package : tis-bginfo
  • version : 4.20-1
  • description : automatic package for BGInfo (Sysinternals)
  • maintainer : Administrateur
  • date : 2018-02-27 18:57:21

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'))

    

Changelog

No changelog
    

manifest.sha256

[["WAPT/certificate.crt", "79e5388683c0b6cb03f4f81e4e58e3a11463b2b6cf169dd9c453098027dcfaa4"], ["WAPT/wapt.psproj", "10d13587166fe21806a3b910b5dc3cfa4bec2b482c8c68cd93eef812c914ab2a"], ["bginfo/tis-default.bgi", "c70872532b2f1110e54f8d3745efc474a2f46f7bc4a1d027dfd03451c5522601"], ["bginfo/Bginfo.exe", "0362cd6e7b318ab9a4c74daf229f11bb795a2ce553ea024cb49143456c27c41d"], ["setup.py", "7ab169d618dc696998d8059ab7d746df022fec5b84637b3f7e7beae39846a0b7"], ["WAPT/control", "a6232bfbc69d24be841575e677f4595baa4d7be2d66cbdc334086e045f6334b4"]]