Wednesday, April 24, 2013

Running SDB files in Custom Action

Running SDB files in Custom Action:

i. Select New EXE -> Stored in Binary Table.

ii. Browse the cmd file in Executable file name (C:\windows\system32\cmd.exe)

iii. Use the command: /C sdbinst.exe -q "[INSTALLDIR]<filename>.sdb"

iv. Select the condition and sequence (we can select ‘After InstallFiles’ usually).

v. To uninstall: /C sdbinst.exe -q -u "[WindowsFolder]AppPatch\Custom\Custom64\{fe973ca9-a291-4d84-8eed-4715ef0af471}.sdb"

To Remove the Service via batch file

To Remove the Service:

In CMD: sc delete "<Service Name>"

Response File Creation for EXE:

Response File Creation:

"C:\LanSafe Installer\Setup.exe" -r -f1C:\LanSafeSilentFile.iss

For Installing:

"C:\LanSafe Installer\Setup.exe" -s -f1C:\LanSafeSilentFile.iss

Permissions

 
Select SETACL’s:

-silent -on "HKEY_CLASSES_ROOT\FareMaintenance.Document" -ot REG -actn ace -ace n:Users;P:FULL

-silent -on "[ProgramFilesFolder]Decision Support" -ot FILE -actn ace -ace n:Users;P:WRITE -ace n:Users;P:FULL

Select CACL’s:


"[ProgramFilesFolder]FileName" /T /E /G Users:F

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