|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#16
|
||||
|
||||
|
Hey, Phil. I obviously can't run this code because I'm not using your setup, however, I've run through the WMI classes you're using. I think your property syntax is wrong first off.
objVDir.Path_ = blah, blah It appears that you should be using the underscore. You're actually using an instance class rather than a standard WMI class. I don't know if this will affect anything or not. In any case, when you are trying to set it to a folder, are you just using the folder path or are you supplying a protocol as well? I'm sure exactly what you're trying to do, but it seems you'd want something like: File:///C|Mysitedirec\httproot rather than just supplying a direct path. I could be way off, but I'd give it a shot.
__________________
Click the image if at any point you don't like my decision.Scripting problems? Windows questions? Ask the Windows Guru! |
|
#17
|
||||
|
||||
|
I really appreciate that response Nilpo and particulary the instance of a class bit. Thanks.
I actually cracked it about 20 minutes ago. You might have heard me scream YES!!!! ![]() The objVDir.Path is OK for this exercise and it does change the setting. What is actually required to invoke this setting, is the removal or 'emptying out' of the objVDir.HTTPRedirect property. i.e. Remove this setting completely by setting it to blank or better still Nothing. [Code] objVDir.HTTPRedirect = Nothing objVDir.Path = "C:\Inetpub\wwwroot\Website1" [\Code] Just in case anyone wants to know how I worked this out, it was by using the METABASE EXPLORER FROM THE IIS 6.0 RESOURCE KIT. I monitored the settings whilst manually changing the website settings in Inetmgr.exe. I noticed the HTTPRedirect property disappeared from the list when I manually set the local path value. I therefore tried setting it to "" and this worked. The HTTPRedirect property doesn't actually disappear from the list when scripting the change to "" but if I set it to '= Nothing', it does disappear. Thanks for all your responses. I sincerely appreciate it. P.S. It's a shame Jim couldn't help!!! ![]() Phil.
__________________
- Post your code - Post your errors - Be clear - Be courteous PLEASE...Finalise your thread with a solution or confirmation that the last advice worked or failed (We are here to help each other).
|
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Scripting > VBScript and IIS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|