Posts

Repackaging Microsoft Visual Studio 2010 Pro (Or any other version)

There are a lot of sites referring the installation of Microsoft Visual Studio 2010 in silent mode, but if you have a closer look, no one gives the complete information on the installation and Un-installation of the package. Here are the steps which I followed to install Visual Studio on 32 bit as well as 64 bit machines. I assure you that you can save atleast 1 to 2 man days by taking information from here before proceeding with your packaging. Copy the compete source to a directory and name this directory as per your standard naming convention. Copy these files to this main directory (Explanation and details also provided later) VS2010_Uninstall-RTM.ENU.exe Dfusrprf.xml User.vbs Arpsuppress64.reg Arpsuppress32.reg Arpsuppresswow64.reg ConfigurationFile.ini Setup.vbs Uninstall.vbs Uninstall.bat These files are the complete list of files which will do the trick to install and un-install the MS Visual Studio 2010 package. You can use WISE Script Editor to create an exe for most of the p...

Frequently asked Questions about COM and Windows installer (MSI) / Application Packaging

What does the common language runtime do? The common language runtime manages the execution of code and provides services such as cross-language integration, code access security, object lifetime management, and debugging and profiling support. Search for "Common Language Runtime" in the MSDN Library ( msdn.microsoft.com/library/ ). What's the difference between managed and unmanaged code? Code developed with a language compiler that targets the common language runtime is called managed code. All code based on Microsoft intermediate language (MSIL) executes as managed code. Managed code is self-describing; it contains metadata that describes every element managed by the common language runtime. The runtime uses the metadata to provide services. Code that runs outside the runtime and does not contain metadata is called unmanaged code. Examples of unmanaged code are COM components, ActiveX interfaces, and Win32 API functions. Unmanaged code executes in the common language r...

Creating MSI for x64 and x86 machines

For some time now I have been packaging for x64 and x86 machines, and have faced numerous issues while creating the MSI for x64 machines. Well MSI will mostly work in x86 because of less complexity of 32 bit machine. There always seems to be a problem when you try to install the application in 64 bit environment. Registry Structure: The Registries install differently in 32 and 64 bit machines. in 64 bit machines, there is a provision to install 32 bit applications registry and this goes in SysWOW64 folder. By default all 32 bit installers install the registry in SysWOW64 hive. If you need to install the registries in normal mode as in directly in the registry as it was in 32 bit machines, then you need to change the Component in your MSI to 64 bit component. This will ensure that your registries are to be installed as 64 bit and not 32 bit. You might face issue in compiling your 32 bit application with a 64 bit component. I would suggest you to compile your Application with 32 bit comp...

Shortcut creation issue in Installshield/WISE Package Studio

Image
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 application. 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 t...

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. Technically, 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 th...

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") else returnstring11="Null" 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....

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 file. By default the osd file has this: &ltsubsystem VALUE = "windows"/&gt You need to change this value to &ltsubsystem VALUE = "console"/&gt 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: &ltvirtualenv TERMINATECHILDREN="FALSE"&gt You need to change the value as below: &ltvirtualenv TERMINATECHILDREN="TRUE"&gt This will terminate the any child application which is associated with this application and will help to shut your application down.