The Windows Installer engine (also called the MSI engine) drives the installation of your application. It is a part of the Windows Installer Service, a technology developed by Microsoft to standardize installations on the Windows platform. Without the Windows Installer engine, installations using the Windows Installer technology cannot be installed. The Windows Installer engine is already installed on Windows XP. For other operating systems, the Windows Installer engine must be installed by the installation or by the home user. Most installations based on the Windows Installer Service automatically install the Windows Installer engine on the computer prior to running the installation. In case of an error or other unexpected behavior, you may need to install the engine manually.
Wednesday, 20 June 2012
What is Registry
The registry is a central database used by the Windows operating system to track your personal settings and the software and hardware installed on your computer. When you install an application, installation choices are written to the registry. The registry contains 5 major branches:
- HKEY_CLASSES_ROOT – contains information on file-related behavior including what files are associated with what applications
- HKEY_CURRENT_USER – contains the preferences of the current user
- HKEY_USERS – contains the preferences of each user on the system
- HKEY_LOCAL_MACHINE – contains operating system, hardware, and application settings
- HKEY_CURRENT_CONFIG – contains hardware settings users can modify for different circumstances
Disadvantages of Nested MSI Installation
The disadvantages of using the Nested MSI's are,
- Nested Installations cannot share components.
- An administrative installation cannot contain a nested installation.
- Patching and upgrading will not work with nested installations.
- The installer will not correctly cost a nested installation.
- Integrated ProgressBars cannot be used with nested installations.
- Resources that are to be advertised cannot be installed by the nested installation.
- A package that performs a nested installation of an application should also uninstall the nested application when the parent product is uninstalled.
Disadvantages of SelfReg Table Entries
• Rollback of an installation with self-registered modules cannot be safely done using DllUnregisterServer because there is no way of telling if the self-registered keys are used by another feature or application.
• The ability to use advertisement is reduced if Class or extension server registration is performed within self-registration routines.
• The installer automatically handles HKCR keys in the registry tables for both per-user or per-machine installations. DllRegisterServer routines currently do not support the notion of a per-user HKCR key.
• If multiple users are using a self-registered application on the same computer, each user must install the application the first time they run it. Otherwise the installer cannot easily determine that the proper HKCU registry keys exist.
• The DllRegisterServer can be denied access to network resources such as type libraries if a component is both specified as run-from-source and is listed in the SelfReg table. This can cause the installation of the component to fail to during an administrative installation.
• Self-registering DLLs are more susceptible to coding errors because the new code required for DllRegisterServer is commonly different for each DLL. Instead use the registry tables in the database to take advantage of existing code provided by the installer.
• Self-registering DLLs can sometimes link to auxiliary DLLs that are not present or are the wrong version. In contrast, the installer can register the DLLs using the registry tables with no dependency on the current state of the system.
• The ability to use advertisement is reduced if Class or extension server registration is performed within self-registration routines.
• The installer automatically handles HKCR keys in the registry tables for both per-user or per-machine installations. DllRegisterServer routines currently do not support the notion of a per-user HKCR key.
• If multiple users are using a self-registered application on the same computer, each user must install the application the first time they run it. Otherwise the installer cannot easily determine that the proper HKCU registry keys exist.
• The DllRegisterServer can be denied access to network resources such as type libraries if a component is both specified as run-from-source and is listed in the SelfReg table. This can cause the installation of the component to fail to during an administrative installation.
• Self-registering DLLs are more susceptible to coding errors because the new code required for DllRegisterServer is commonly different for each DLL. Instead use the registry tables in the database to take advantage of existing code provided by the installer.
• Self-registering DLLs can sometimes link to auxiliary DLLs that are not present or are the wrong version. In contrast, the installer can register the DLLs using the registry tables with no dependency on the current state of the system.
VBScript to Display Countdown Timer
Following script displays countdown timer
Dim counter
Dim oShell
counter = 10
Set oShell= CreateObject("Wscript.Shell")
While counter > 0
oShell.Popup " Left " & counter & " Seconds",1,"Remind"
counter = counter-1
Wend
Dim counter
Dim oShell
counter = 10
Set oShell= CreateObject("Wscript.Shell")
While counter > 0
oShell.Popup " Left " & counter & " Seconds",1,"Remind"
counter = counter-1
Wend
Tuesday, 19 June 2012
Set Shortcut Working Directory - VBScript
Following script checks for Windows XP or Windows7 and sets working directory accodingly.
'Option Explicit
Dim objShell, ALLUSERSPROFILE, SysDrive, objShtCut
Set objShell = WScript.CreateObject("WScript.Shell")
ALLUSERSPROFILE =objShell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%")
APPDATA =objShell.ExpandEnvironmentStrings("%APPDATA%")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ver= objOperatingSystem.Caption
Next
S = InStr(ver,"XP")
If S > 0 Then
Set objShtCut = objShell.Createshortcut(ALLUSERSPROFILE &"\Start Menu\Programs\SampleTest.lnk")
objShtCut.WorkingDirectory = APPDATA & "\Sample"
objShtCut.Save
else
Set objShtCut = objShell.Createshortcut(ALLUSERSPROFILE &"\Microsoft\Windows\Start Menu\Programs\SampleTest.lnk")
objShtCut.WorkingDirectory = APPDATA & "\Sample"
objShtCut.Save
end if
WScript.Quit
'Option Explicit
Dim objShell, ALLUSERSPROFILE, SysDrive, objShtCut
Set objShell = WScript.CreateObject("WScript.Shell")
ALLUSERSPROFILE =objShell.ExpandEnvironmentStrings("%ALLUSERSPROFILE%")
APPDATA =objShell.ExpandEnvironmentStrings("%APPDATA%")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ver= objOperatingSystem.Caption
Next
S = InStr(ver,"XP")
If S > 0 Then
Set objShtCut = objShell.Createshortcut(ALLUSERSPROFILE &"\Start Menu\Programs\SampleTest.lnk")
objShtCut.WorkingDirectory = APPDATA & "\Sample"
objShtCut.Save
else
Set objShtCut = objShell.Createshortcut(ALLUSERSPROFILE &"\Microsoft\Windows\Start Menu\Programs\SampleTest.lnk")
objShtCut.WorkingDirectory = APPDATA & "\Sample"
objShtCut.Save
end if
WScript.Quit
Subscribe to:
Comments (Atom)