A: Use a script like this.
A: Use a script like this.
A: Use a script like this.
A: Use a script like this.
A: Use a script like this.
A: In WIX, the File element has an attribute named "Assembly" that, if set to .net, overrides the target directory and instead installs the assembly to the GAC. This attribute should ONLY be set on assemblies that need to be installed to the GAC. To fix the error, either change the attribute value or sign the assembly. Courtesy, indirectly, this blog posting.
A: Rename the .config file to "CustomAction.config". The runtime environment of a NET component is actually determined by the host loading it. WIX has implemented special support to recognize the config of DLL and use it, but it must be named exactly CustomAction.config or this doesn't work.
A: The Before/After attribute of the Custom element is referencing something that does not exist, such as a dialog name. Remove this clause and rebuild.
A: This is due to a bug in InstallShield's implementation. The viewer custom action relies on the directory table initialization, which does not occur until CostInitialize. To fix this:
Open the install in InstallShield and goto the Direct editor.
In the custom action table, change the type of ShowMsiLog to 242.
Change the Source field of the ShowMsiLog custom action to a new property name - for example, ShowMsiLogViewer.
Return to the normal InstallShield custom action editor and create a new set property (type 51) CA, called for example ShowMsiLogViewer_SetProp, that sets the property specified in step 3 equal to "[SystemFolder]\notepad.exe".
In the UI sequence view, sequence the new CA created in step 4 in just before LaunchConditions.
Courtesy this blog posting..
A: Write a custom action that sends a special message and sequence it into the Execute sequence, not UI. This will disable the cancel button AFTER MSI has finished initializing - after it enters the transacted sequence - so users will still see an active Cancel button briefly during initialization. Source this article. Use code like this.
function Dag_DisableCancelButton()
{
var logRecord = Session.Installer.CreateRecord(2);
logRecord.IntegerData(1) = 2;
logRecord.IntegerData(2) = 0;
Session.Message(Session_Message_Type_CommonData, logRecord)
}
A: Open the Project outside of Visual Studio, click Product Details|Control Panel Icon, reselect the icon, then select File|Save. Courtesy this page.
A: You can't. The MSI provider for PowerShell is very limited. Use a VBScript/JavaScript/C++ custom action instead, running PowerShell from it to perform the PowerShell logic if needed. Courtesy this link.
A: This was an intentional change Microsoft made at Windows 7 to improve application compatibility, by extending pre-existing "version lie" functionality to msiexec. There is no fix. To workaround this, either use the VersionNT property in MSI, or repackage your executable code so it is an EXE with a proper manifest, which will avoid this problem. For example, if this is code in DllRegisterServer, do manual COM registration/unregistration instead via regsvr32. Courtesy this MSDN link.
A: Follow these steps:
Get the MAC address and hostname of the machine.
Login to the Flexera license provisioning website and generate a license, using the MAC and hostname from step 1.
Click Save All to save the license to a file. If this is the second time generating a license for this MAC, the license will list both products separately.
Copy the LIC file to license.lic in the System subdirectory of InstallShield Standalone.
A: InstallShield 2014 is officially not compatible with Windows 10. In particular, the kernel driver used for COM Extract is incompatible with Windows 10. To workaround this, set HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\InstallShield\RegSpy\UseAPIRegistryHooks equal to 1 or 0. Value 1 uses registry redirection, and value 0 uses an older API hooking method that probably won't work. Value 2 is the default kernel driver method. Note this will affect all versions of InstallShield on the machine. Flexera has a good though somewhat buried article on their COM Extract technologies here.
A: Run it with /debuglog. The bootstrapper logs to "%TEMP%\InstallShield.txt".
A: Edit the custom action type and add the poorly documented msidbCustomActionTypeHideTarget flag, value 0x2000. That will suppress logging of Target unless MisLogging has the debug flag set. There is no absolute way to suppress the logging.
A: The COM Extract process ISRegSpy only logs entries that are written if they do not already exist. Modify your install build script to unregister the problematic objects before calling InstallShield. Note for .NET, if an assembly has a type library, it will not be unregistered unless /tlb is specified on the regasm command line.
A: Not reliably. The FileSystemObject's methods are specifically designed for text files and will fail in DBCS locales with certain binary strings. Write a C++ or NET EXE custom action instead. See this MSDN blog.
A: Use the StdRegProv WMI provider, but the EnumKeys method can't be called directly due to language limitations. Instead, use WMI's indirect method invocation to execute the method. However, note that when run inside an MSI, this will access the 32-bit registry. Sources: MSDN WMI Sample, this page citing the problem.
function EnumerateSubkeys( rootHiveCode, subkeyPath )
{
// The EnumKey method cannot be called directly from JavaScript because the keys out parameter is not supported.
// Instead, the method is called with WMI's equivalent of reflection.
var wmiRegistryProvider = GetObject("winmgmts:\\\\.\\root\\default:StdRegProv");
method = wmiRegistryProvider.Methods_.Item("EnumKey");
var inParams = method.InParameters.SpawnInstance_();
inParams.hDefKey = rootHiveCode;
inParams.sSubKeyName = subkeyPath;
var outParams = wmiRegistryProvider.ExecMethod_(method.Name, inParams);
return outParams.sNames.toArray();
}
A: Create a WbemScripting.SWbemNamedValueSet object to specify the context as 64-bit, then pass this to a WbemScripting.SWbemLocator in ConnectServer and invoke the method via WMI reflection. For example:
// Determines if the specified registry key exists
// regType - optional, 32 or 64 to specify the 32-bit or 64-bit registry. Default 64.
// valueName - optional, if unspecified uses default value
function Registry_KeyExists( rootHiveCode, keyPath, valueName, regType )
{
if (regType == undefined)
regType = 64;
if ((valueName == undefined) || (StringIsNullOrEmpty(valueName)))
valueName = "";
var wmiContext = new ActiveXObject("WbemScripting.SWbemNamedValueSet");
wmiContext.Add("__ProviderArchitecture", regType);
var wmiFactory = new ActiveXObject("WbemScripting.SWbemLocator");
var wmiServer = wmiFactory.ConnectServer("", "root\\default", "", "", "", "", 0, wmiContext);
var wmiRegistryProvider = wmiServer.Get("StdRegProv");
var valueExists = false;
var methodInvocationInfo = wmiRegistryProvider.Methods_("CheckAccess").Inparameters;
methodInvocationInfo.hDefkey = rootHiveCode;
methodInvocationInfo.sSubkeyname = keyPath;
methodInvocationInfo.uRequired = 1;
try
{
var methodResult = wmiRegistryProvider.ExecMethod_("CheckAccess", methodInvocationInfo, 0, wmiContext);
valueExists = methodResult.bGranted;
}
catch (ignoredException)
{
// Ignore
}
return valueExists;
}
Source: here, among others.