Tuesday, August 16, 2011

Shortcut creation issue in Installshield/WISE Package Studio

IIS Express 7.5 is a vendor MSI package and the MSI is created by WiX. Though there is no problem as such while

customizing this application, but I found an issue while adding a shortcut to this application.
While creating IIS Express 7.5 package recently, I faced an issue that I was not able to add shortcut in this


This for the matter of fact I realized that the shortcut table did not exist in this application. The error which

I was getting was "Field shortcut of table shortcut: Error retrieving shortcut of table"
To get this error fixed, I added the shortcut table and following entries in _Validation table:

After adding this I added CreateShortcuts Action in InstallExecuteSequence Table at Sequence 4500. This was

because, since there was no shortcut table, the sequence too was missing from MSI. Due to this the shortcut was

not getting created.

Once I did both these things, the application is installed fine with the shorcut.

This can be used with other missing tables as well. We need to add the entries in _Validation table for all the

tables which are missing for its every corresponding column.

Hope this will help you if you face similar issue in future.

Thursday, August 11, 2011

Installing executable from remote location by suppressing the Open File Prompt

Many times while running a script/application exe from a network we get an error that the application is not from a trusted source and if we want to install the particular application or not.
This error comes because the source is not digitally signed and the Operating System prompts to ask from user if it is a known source to user or if something malicious is being run from network. This is just to protect the end users from the malicious software or Virus attack.


This behavior was introduced in Windows XP SP2 because of the addition of the Attachment Execution Services (AES). Every program that is run by using the ShellExecute() API passes through AES. AES considers the downloaded update file to be from the Internet Zone. Therefore, AESdisplays the Open File - Security Warning dialog box. AES examines the file to see whether the file has a file stream of the type Zone.Identifier. Then AES determines what zone the file is from and what level of protection to apply when the file is run.

You can use the below code to suppress this message for your application to work fine.

set oShell= CreateObject("Wscript.Shell")

set oEnv = oShell.Environment("PROCESS")


<Your Code here>


Please note that you should not set this as a permanent environment variable as it will disable all Zone Checking and it is not recommended.

VB Script to check for Microsoft Office 2003 and Word 2007

I had written this script to check the presence of MS Office 2003 and Word 2007 on a machine before proceeding for installation. Here is the code:

officepath11= sProgramFilesDir & "\Microsoft Office\Office11\"
officepath12= sProgramFilesDir & "\Microsoft Office\Office12\"

'set File System Object
set fso=createobject("scripting.filesystemobject")

'Check if file exists for Office 2003 and if yes then its version
path11 = fso.GetAbsolutePathName("C:\Program Files (x86)\Microsoft Office\Office11\winword.exe")

if (fso.FileExists(path11)) then
returnstring11=fso.getfileversion(officepath11 & "winword.exe")
end if

'Check if file exists for Word 2007 and if yes then its version
path12 = fso.GetAbsolutePathName("C:\Program Files (x86)\Microsoft Office\Office12\winword.exe")

if (fso.FileExists(path12)) then
returnstring12=fso.getfileversion(officepath12 & "winword.exe")
end if


if (arr11(0)="11" AND arr12(0)="12") then
'msgbox "Office 2003 and word 2007 both are installed, continue with script below"
if (arr11(0)="11" AND arr12(0)="Null") then
msgbox "Please install Word 2007 before installing this application"
if (arr11(0)="Null" AND arr12(0)="12") then
msgbox "Please install Office 2003 before installing this application"
if (arr11(0)="Null" AND arr12(0)="Null") then
msgbox "Please install Office 2003 and Word 2007 before installing this application"
end if
end if
end if
end if

set fso=nothing

Wednesday, August 10, 2011

Issues while launching and closing of App-V shortcuts

While launching your App-V shortcut, if you notice that the buffering launch on bottom right says 100% but the

launch does not disappear as per normal behaviour then you need to do some modification in your osd file.

This possible is a cause if your application is Java related. You need to modify the Subsystem value in your osd

By default the osd file has this:

<subsystem VALUE = "windows"/>

You need to change this value to

<subsystem VALUE = "console"/>

If you face a similar problem while closing the application or your application does not close completely, then

you need to again tweek your osd file.

By default you have following in your OSD file:


You need to change the value as below:


This will terminate the any child application which is associated with this application and will help to shut

your application down.