I am trying to install application using a script. This application creates a virtual directory under Default Web Site in IIS. I have written this script. Is this right script or i am missing some thing.
cd C:\Users\Administrator\Desktop
msiexec /qb /i ZFPSetup.msi INSTALLLOCATION="C:\Program Files (x86)\Application" TARGETVDIR="ZFP" WIXUI_EXITDIALOGOPTIONALCHECKBOX=1 /l*v "C:\log.txt"
iisvdir /create Default Web Site ZFP C:\Program Files (x86)\Application\ZFP
call "C:\Program Files (x86)\Application\StartKaraf.bat" echo error
I am getting below error:
MSI (s) (28:D0) [04:25:58:897]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIF886.tmp, Entrypoint: WriteIIS7ConfigChanges
WriteIIS7ConfigChanges: Error 0x80070002: Site not found for create application
WriteIIS7ConfigChanges: Error 0x80070002: Failed to configure IIS application.
WriteIIS7ConfigChanges: Error 0x80070002: WriteIIS7ConfigChanges Failed.
CustomAction WriteIIS7ConfigChanges returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Using simple batch files is not the best way to go about configuring IIS. For system administration tasks such as this, Microsoft created PowerShell.
Check out how to configure IIS using PowerShell here: http://www.iis.net/learn/manage/powershell.
Here's an example of how to use PowerShell to create a virtual directory in IIS:
The code above uses the PowerShell Snap-In for Creating Applications.
Good luck!