I am trying to get the installer to call aspnet_iisreg to encrypt sections of my web.config file. I have given up getting this to work as a launch file custom action as everything I have tried has failed. I decided to just do an script inline custom action instead and have almost got it working but only if I pass it a specific working dirctory. I need it to take a session property or environment variable instead. APPDIR won't work as the trailing slash kills aspnet_iisreg so I created a different inline script that creates an INSTALL_LOC public property by storing APPDIR without the trailing slash. I need to be able pass INSTALL_LOC as a parameter to aspnet_iisreg in the vbs but I have tried everything I can think of but had no success.
This works:
Dim WshShell, oExec : Set WshShell = CreateObject("WScript.Shell") : Set oExec = WshShell.Exec("C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -pef appSettings D:\inetpub\wwwrootAPP\APPCode")
But I can't figure out how to either pass it the session property INSTALL_LOC or the environment variable %APPINST_DIR% to use in place of the path D:\inetpub\wwwrootAPP\APPCode.
Can I get some assistance on how to fomat this?
FOLLOW US
Get the latest news in Application Packaging