I want to convert a folder to an application with IIS using Inno Setup.
I found that I can do it with PowerShell, using
ConvertTo-WebApplication 'IIS:\Sites\Default Web Site\MY_APP'
I have added this to my Inno Setup script:
[Run]
Filename: "powershell.exe"; \
Parameters: "-ExecutionPolicy Bypass -Command ConvertTo-WebApplication 'IIS:\Sites\Default Web Site\MY_APP'" \
WorkingDir: {app}; Flags: runhidden
But PowerShell is failing with:
Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154 Class not registered