Summary
Powershell custom actions fail based on modules not available.
Synopsis
Powershell custom actions will not work as expected if "import" statements that required DLLS need to be loaded into the process.
Discussion
Verbose install logs indicate similar errors indicating not being able to locate something by name.
For example:
# SomeFile.ps1
import-module WebAdministration
foreach ($someSite in get-childitem IIS:\Sites)
{
echo $someSIte
}
This code results in
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Framework
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.PowerShell.Provider
InstallShield: Couldn't resolve assembly by name Microsoft.IIS.Powershell.Provider.resources
Workaround
- When testing ensure you can run the Powershell script outside of InstallShield.
- Import required modules and make sure they exist.
- Use Try-Catch blocks for error handling.
- Include return value in the debugging effort.
Related Articles
Determining the Actual Path of a File Installed to the Global Assembly Cache 7Number of Views Property Not Resolved for Shortcut Name 4Number of Views Installation Fails for COM+ Application That Has a Shared .NET Assembly or a Dependency of a Shared .NET Assembly Being In… 8Number of Views Troubleshooting .NET Assembly Installation Issues 12Number of Views Specify the Version of .NET Framework for .NET Precompile Assembly 11Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add additional feedback (optional)
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
|
FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513
(toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367
(toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895
2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago