Thursday, January 31, 2013

Task Kill

Task Kill in Custom Action:
 
CMD:

/C taskkill /IM <EXE_Name> /F
 
VB Script:
 
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = '<EXE_Name>'")
For Each objProcess in colProcessList
    objProcess.Terminate()
Next

Tuesday, January 29, 2013

Properties to suppress restart prompt during un-installation:

Properties to suppress restart prompt during un-installation:

MSIRESTARTMANAGERCONTROL=Disable

MSIRESTARTMANAGER=1

MSIDISABLERMRESTART=Disable

MSIRMSHUTDOWN=2

Monday, January 28, 2013

To suppress prompting windows security alert (Firewall options)

To suppress prompting windows security alert (Firewall options) on launching application shortcuts:
Use the below commands,
Command1: <path of netsh.exe> advfirewall firewall add rule name="<name of the function>" dir=in|out action=allow|block program="C:\Program Files (x86)\Arc\Arc Connect\Operator\Operator.exe" enable=no profile=public|private|domain

    netsh.exe location : C:\windows\system32

Command2: "%windir%\system32\netsh.exe" Firewall add allowedprogram "%ProgramFiles(x86)%\Tealeaf\RealiTeaPro.exe" "Tealeaf Technology RealTeaViewer"
During Silent installation, if you want to run the Setup.EXE in compatibility mode through batch file:

Command: set __COMPAT_LAYER=WINXPSP3 RUNASADMIN