Archive for the ‘Wise Package Studio Training’ Category

What is Application Repackaging

September 5, 2011 Leave a comment

Repackaging (Customized Installation) is the process of capturing the changes made by an Installation Program (Package) and it is designed to support company standards and distribution methods. Following are the steps for repackaging an application.

  • Review the packaging requirements with the projects sponsor
  • Analyze the vendor package (Tech Review)
  • Repackage the application (Scripting)
  • Customize the package
  • Test the package
  • Release the package to end users

Processing Options in Custom Actions

September 5, 2011 Leave a comment
  • Synchronous

Windows Installer runs the custom action synchronously to the main installation. It waits for the custom action to complete successfully before continuing the main installation.


  • Synchronous, ignore exit code

Windows Installer runs the custom action synchronously to the main installation. It waits for the custom action to complete before continuing the main installation; the action can be either success or fail.


  • Asynch, wait at end of sequence

Windows Installer runs the custom action simultaneously with the main installation. At the end it waits for the exit code from the custom action before continuing.


  • Asynch, no wait

Windows Installer runs the custom action simultaneously with the main installation. It doesn’t wait for completion of the custom action and doesn’t check the exit code also.

How to resolve ICE38 Error

September 5, 2011 1 comment
Component DesktopFolder installs to user profile. It must use a registry key under HKCU as its
KeyPath, not a file.
In the Components Tab, find the CurrentUser component, which holds all the user's information. Pick
one of the registry keys (except the one set as a keypath), right click on it and select the option 'Move'.
Move that key to the component referred on the ICE error message. Go to that component, open it and
find the 'new key'. Right click on the entry and select 'Set as Key' option.

What are MergeModules

September 5, 2011 Leave a comment

Merge modules provide a standard method by which developers deliver shared Microsoft® Windows® Installer components and setup logic to their applications. Merge modules are used to deliver shared code, files, resources, Registry entries, and setup logic to applications as a single compound file. Developers authoring new merge modules, or using existing merge modules, should follow the standard outlined in this section.

A merge module is similar in structure to a simplified Windows Installer .msi file. However, a merge module cannot be installed alone, it must be merged into an installation package using a merge tool. Developers wanting to use merge modules must obtain one of the freely distributed merge tools, such as Mergemod.dll, or purchase a merge tool from an independent software vendor. Developers can create new merge modules by using many of the same software tools used to create a Windows Installer installation package, such as the database table editor Orca provided with the Windows Installer SDK.

When a merge module is merged into the .msi file of an application, all the information and resources required to install the components delivered by the merge module are incorporated into the application’s .msi file. The merge module is then no longer required to install these components and the merge module does not need to be accessible to a user. Because all the information needed to install the components is delivered as a single file, the use of merge modules can eliminate many instances of version conflicts, missing Registry entries, and improperly installed files.

Hide ARP entry of an MSI

August 30, 2011 Leave a comment

VBScript to hide ARP entry of an MSI. In place of [ProductCode] give the product code of the msi for which you want to hide the ARP entry.

Dim WSHShell,strRegKey 
Set WSHShell = WScript.CreateObject("WScript.Shell") 
WSHShell.Regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\[ProductCode]\SystemComponent","1","REG_DWORD"

SendKeys using VBScript

August 30, 2011 Leave a comment

Following script is an example of how to use SendKeys function available in VBScript to pass automated clicks to an application.

Application Window Name should be changed in the script according to application that you are working on.

On Error Resume Next

Set WshShell = CreateObject("WScript.Shell")
strWindowNameEN = "Application Window Name"

successEN = False

successEN = WshShell.AppActivate(strWindowNameEN)
Loop Until (successEN = True)

If (successEN) Then
WshShell.AppActivate strWindowNameEN
End IF

WshShell.SendKeys "{TAB}"
WshShell.SendKeys "{ENTER}"

Add entries to Hosts File

August 30, 2011 Leave a comment

Following script can be used to append entries in HOSTS file. A text file containing the entry to be appended should be placed in INPUT location as in below script


Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim TargetFile,objWshShell,objFSO, Input, ProgramFiles, WinDir
Dim objTextFile, Target
Set objWshShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
ProgramFiles = ObjWshShell.ExpandEnvironmentStrings("%ProgramFiles%")
WinDir = ObjWshShell.ExpandEnvironmentStrings("%WinDir%")
Set Targetfile = objFSO.GetFile(WinDir & "\system32\drivers\etc\hosts")
Set Input = objFSO.GetFile(ProgramFiles & "\Input.txt")

Set objTextFile = objFSO.OpenTextFile (Input, ForReading)
Set Target = CreateObject("Scripting.FileSystemObject")
Set TargetFile = Target.OpenTextFile (TargetFile, ForAppending, True)
Do Until objTextFile.AtEndOfStream
Input = objTextFile.ReadLine
objFSO.DeleteFile(ProgramFiles & "\Input.txt")