Answered by:
Error while running script through web setup installer.

Question
-
Hi,
I am trying to run a script to 'add an application pool and to set its identity on iis 7.0.' through installer(web setup project ).But its giving error in script while installing it on windows server 2008 r2 64 bit .I have created installer through visual studio 2005.
Script I am using is as follows:
Function CreateNewAppPool()
dim AppPools, newAppPool,shell
set shell = CreateObject("WScript.Shell")
domain = shell.ExpandEnvironmentStrings("%USERDOMAIN%")
msgbox(domain)
msgbox(domain&"\"&myaccount)
set AppPools = GetObject("IIS://localhost/w3svc/AppPools")
msgbox("Creating app pool")
set newAppPool = AppPools.Create("IIsApplicationPool", "testpool") // error is coming at this pointmsgbox("Set pool identity")
newAppPool.WamUserName = domain&"\"&username
newAppPool.WamUserPass = InputBox("Password")
newAppPool.LogonMethod =1
newAppPool.AppPoolIdentityType=3
newAppPool.SetInfo
if err = 0 then
CreateNewAppPool = True
msgbox("App pool created")
else
CreateNewAppPool = false
msgbox("Error")
end if- Moved by Ed Price - MSFTMicrosoft employee Monday, July 16, 2012 8:49 AM (From:MSDN, TechNet, and Expression Profile and Recognition System Discussions)
Tuesday, July 10, 2012 2:56 PM
Answers
-
IIS Forum
- Proposed as answer by Ed Price - MSFTMicrosoft employee Monday, July 16, 2012 8:47 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Monday, July 23, 2012 8:50 PM
Wednesday, July 11, 2012 5:29 AM -
Please post your question at the forums at http://iis.net. This is the TechNet Profile forum.
I'm moving this to the Where Is forum, since we're answering where to ask this question.
Thanks!
Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)
- Proposed as answer by Ed Price - MSFTMicrosoft employee Monday, July 16, 2012 8:48 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Monday, July 23, 2012 8:50 PM
Monday, July 16, 2012 8:48 AM
All replies
-
Which forum should this question belong?
For every expert, there is an equal and opposite expert. - Becker's Law
My blogWednesday, July 11, 2012 3:33 AM -
IIS Forum
- Proposed as answer by Ed Price - MSFTMicrosoft employee Monday, July 16, 2012 8:47 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Monday, July 23, 2012 8:50 PM
Wednesday, July 11, 2012 5:29 AM -
Please post your question at the forums at http://iis.net. This is the TechNet Profile forum.
I'm moving this to the Where Is forum, since we're answering where to ask this question.
Thanks!
Ed Price (a.k.a User Ed), SQL Server Experience Program Manager (Blog, Twitter, Wiki)
- Proposed as answer by Ed Price - MSFTMicrosoft employee Monday, July 16, 2012 8:48 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Monday, July 23, 2012 8:50 PM
Monday, July 16, 2012 8:48 AM