Difference between revisions of "Active Directory/Documentation/Packaging Notes"

From WolfTech
Jump to navigation Jump to search
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
==Common Pitfalls==
 +
* Make sure to exclude files and registry entries that aren't a part of the software under packaging.
 +
* Check the environment variables.
 +
* Determine is environment variables should be set to replace.
 +
* Set INI file properties to replace.
 +
 
==Upgrading Packages in Group Policy==
 
==Upgrading Packages in Group Policy==
 
* When upgrading a software package from another group policy, the new group policy must be ahead of the upgraded group policy in the link order (i.e. the new policy must have a higher precedence than the old policy).
 
* When upgrading a software package from another group policy, the new group policy must be ahead of the upgraded group policy in the link order (i.e. the new policy must have a higher precedence than the old policy).
Line 6: Line 12:
 
* For script based actions, I usually choose <b>Stored in custom action</b>.
 
* For script based actions, I usually choose <b>Stored in custom action</b>.
 
* For most actions, it makes sense to sequence them in the <b>Install Exec Sequence</b> after all the other actions.
 
* For most actions, it makes sense to sequence them in the <b>Install Exec Sequence</b> after all the other actions.
* MSI Custom Actions do not support the WScript object model (see the example below).<BR><BR>Set WShell = WScript.CreateObject("WScript.Shell")<BR><BR>instead of<BR><BR>Set WShell = CreateObject("WScript.Shell")
+
* MSI Custom Actions do not support the WScript object model (see the example below).<BR><BR><b>Set WShell = WScript.CreateObject("WScript.Shell")</b><BR><BR>instead of<BR><BR><b>Set WShell = CreateObject("WScript.Shell")</b><BR><BR>
* To only run action during installation, add the following condition:<BR><BR>NOT Installed
+
* To only run action during installation, add the following condition:<BR><BR><b>NOT Installed</b><BR><BR>
* To only run action during uninstallation, add the following condition:<BR><BR>Installed AND REMOVE="ALL"
+
* To only run action during uninstallation, add the following condition:<BR><BR><b>Installed AND REMOVE="ALL"</b><BR><BR>
 +
 
 +
==Converting To Cabs==
 +
 
 +
*Use WiMakCab.vbs script
 +
cscript E:\Packages\Scripts\WiMakCab.vbs /C /U /S <msi> <cab name>
 +
 
 +
*Notes:
 +
 
 +
[http://windowssdk.msdn.microsoft.com/en-us/library/ms710799.aspx Word Count Summary] = 2
 +
 
 +
[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/file_table.asp File Table Attributes] = 16384
 +
 
 +
cabarc -r N data.cab *
 +
 
 +
==Query MSI Databse==
 +
* Use WiRunSQL.vbs
 +
cscript E:\Packages\Scripts\WiRunSQL.vbs <msi> <sql>
 +
* Change all INI entries to overwrite old entries.
 +
cscript E:\Packages\Scripts\WiRunSQL.vbs <msi> "UPDATE `IniFile` SET `Action`=0 WHERE `Action`=1"

Latest revision as of 10:02, 13 July 2007

Common Pitfalls

  • Make sure to exclude files and registry entries that aren't a part of the software under packaging.
  • Check the environment variables.
  • Determine is environment variables should be set to replace.
  • Set INI file properties to replace.

Upgrading Packages in Group Policy

  • When upgrading a software package from another group policy, the new group policy must be ahead of the upgraded group policy in the link order (i.e. the new policy must have a higher precedence than the old policy).

Custom Actions

  • For script based actions, I usually choose Stored in custom action.
  • For most actions, it makes sense to sequence them in the Install Exec Sequence after all the other actions.
  • MSI Custom Actions do not support the WScript object model (see the example below).

    Set WShell = WScript.CreateObject("WScript.Shell")

    instead of

    Set WShell = CreateObject("WScript.Shell")

  • To only run action during installation, add the following condition:

    NOT Installed

  • To only run action during uninstallation, add the following condition:

    Installed AND REMOVE="ALL"

Converting To Cabs

  • Use WiMakCab.vbs script
cscript E:\Packages\Scripts\WiMakCab.vbs /C /U /S <msi> <cab name>
  • Notes:

Word Count Summary = 2

File Table Attributes = 16384

cabarc -r N data.cab *

Query MSI Databse

  • Use WiRunSQL.vbs
cscript E:\Packages\Scripts\WiRunSQL.vbs <msi> <sql>
  • Change all INI entries to overwrite old entries.
cscript E:\Packages\Scripts\WiRunSQL.vbs <msi> "UPDATE `IniFile` SET `Action`=0 WHERE `Action`=1"