Joon Posted September 2, 2009 Share Posted September 2, 2009 (edited) I'm trying to convert following vbscript to AutoIt. Set IIsWebVDirObj = GetObject("IIS://LocalHost/W3SVC/1/Root/iq") IIsWebVDirObj.AppCreate3 2, "IQAppPool", True IIsWebVDirObj.AppFriendlyName = "iq" IIsWebVDirObj.SetInfo Below code fails on line 2, AppCreate3. I have no idea how to make AutoIt to pass 3 parameters. Thank you. $IIsWebVDirObj = ObjGet("IIS://LocalHost/W3SVC/1/Root/iq") $IIsWebVDirObj.AppCreate3 (2, "IQAppPool", True) $IIsWebVDirObj.AppFriendlyName = "iq" $IIsWebVDirObj.SetInfo Edited September 2, 2009 by Joon Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 2, 2009 Share Posted September 2, 2009 I'm trying to convert following vbscript to AutoIt. Set IIsWebVDirObj = GetObject("IIS://LocalHost/W3SVC/1/Root/iq") IIsWebVDirObj.AppCreate3 2, "IQAppPool", True IIsWebVDirObj.AppFriendlyName = "iq" IIsWebVDirObj.SetInfo Below code fails on line 2, AppCreate3. I have no idea how to make AutoIt to pass 3 parameters. Thank you. $IIsWebVDirObj = ObjGet("IIS://LocalHost/W3SVC/1/Root/iq") $IIsWebVDirObj.AppCreate3 (2, "IQAppPool", True) $IIsWebVDirObj.AppFriendlyName = "iq" $IIsWebVDirObj.SetInfo Try -1 instead of "True". I seem to recall the VBScript boolean True versus AutoIt gave me trouble at some point before. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Joon Posted September 2, 2009 Author Share Posted September 2, 2009 Failed on passing 1 as true value. The requested action with this object has failed.: $IIsWebVDirObj.AppCreate3 (2, "IQAppPool", 1) $IIsWebVDirObj.AppCreate3 (2, "IQAppPool", 1)^ ERROR Link to comment Share on other sites More sharing options...
GEOSoft Posted September 2, 2009 Share Posted September 2, 2009 -1 George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 2, 2009 Share Posted September 2, 2009 Failed on passing 1 as true value.The requested action with this object has failed.:$IIsWebVDirObj.AppCreate3 (2, "IQAppPool", 1)$IIsWebVDirObj.AppCreate3 (2, "IQAppPool", 1)^ ERRORYou know, I screwed up a lot of algebra problems in my day by accidentally dropping negative signs... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Joon Posted September 2, 2009 Author Share Posted September 2, 2009 Oh, I didn't look closely enough. I tried with -1 and give me same result. $IIsWebVDirObj.AppCreate3 (2, "IQAppPool", -1) $IIsWebVDirObj.AppCreate3 (2, "IQAppPool", -1)^ ERROR Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 2, 2009 Share Posted September 2, 2009 (edited) Oh, I didn't look closely enough. I tried with -1 and give me same result.$IIsWebVDirObj.AppCreate3 (2, "IQAppPool", -1)$IIsWebVDirObj.AppCreate3 (2, "IQAppPool", -1)^ ERRORRats. And you are using IIS 6 minimum (the VBScript works)? P.S. Should you be creating it as a pooled process (IAppMode = 2)? This example uses OUT_OF_PROCESS = 1 for IAppMode. Edited September 2, 2009 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Joon Posted September 2, 2009 Author Share Posted September 2, 2009 Rats. And you are using IIS 6 minimum (the VBScript works)? Yes, I'm using IIS6. Windows 2003 R2 64bit to be exact.And vbscript works. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 2, 2009 Share Posted September 2, 2009 Yes, I'm using IIS6. Windows 2003 R2 64bit to be exact. And vbscript works. I was afraid of that. All I can tell you so far is that AutoIt doesn't have a problem with more than two parameters. Things like this work fine: $oExcel.WorkBooks.Open($sFilePath, Default, $fReadOnly, Default, $sPassword, $sWritePassword) Hopefully someone smarter will come along... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Juvigy Posted September 3, 2009 Share Posted September 3, 2009 Do you know the full number of parameters of IIsWebVDirObj.AppCreate3 ? With VBS to AutoIT conversion i noticed that you have to list the optional parameters for the function to work. For example if there is an 4 parameter: $IIsWebVDirObj.AppCreate3 (2, "IQAppPool",true) wont work but $IIsWebVDirObj.AppCreate3 (2, "IQAppPool", true, 0) may work. I couldnt find any documentation on that function but dont have time to dig more. As a workaround you can use fileinstall to include the vbs script and the use run to tun it from autoit. Link to comment Share on other sites More sharing options...
cageman Posted September 3, 2009 Share Posted September 3, 2009 http://msdn.microsoft.com/en-us/library/ms525258.aspx seems to be right Link to comment Share on other sites More sharing options...
GEOSoft Posted September 3, 2009 Share Posted September 3, 2009 Good possibility that the quotes in that line have to remain so try this $IIsWebVDirObj.AppCreate3 (2, '"IQAppPool"', True) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now