Windows Scripting
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Iron Speed
Go Back   ASP Free ForumsSystem AdministrationWindows Scripting

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
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  
Old December 5th, 2007, 09:30 AM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Novice (500 - 999 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 675 Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)Nilpo User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 156663 Folding Title: Super Ultimate Folder - Level 1Folding Points: 156663 Folding Title: Super Ultimate Folder - Level 1Folding Points: 156663 Folding Title: Super Ultimate Folder - Level 1Folding Points: 156663 Folding Title: Super Ultimate Folder - Level 1Folding Points: 156663 Folding Title: Super Ultimate Folder - Level 1Folding Points: 156663 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Days 18 h 35 m 6 sec
Reputation Power: 308
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
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.
Comments on this post
PhilCollins99 agrees: Thanks for the response and the effort Nilpo!
__________________
Click the image if at any point you don't like my decision.

Scripting problems? Windows questions? Ask the Windows Guru!


Reply With Quote
  #17  
Old December 5th, 2007, 10:51 AM
PhilCollins99's Avatar
PhilCollins99 PhilCollins99 is offline
The Constant Student
ASP Free Novice (500 - 999 posts)
 
Join Date: Aug 2004
Location: England
Posts: 913 PhilCollins99 User rank is Sergeant Major (2000 - 5000 Reputation Level)PhilCollins99 User rank is Sergeant Major (2000 - 5000 Reputation Level)PhilCollins99 User rank is Sergeant Major (2000 - 5000 Reputation Level)PhilCollins99 User rank is Sergeant Major (2000 - 5000 Reputation Level)PhilCollins99 User rank is Sergeant Major (2000 - 5000 Reputation Level)PhilCollins99 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 5 h 40 m 9 sec
Reputation Power: 27
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.
Comments on this post
micky agrees: thanx for sharing the solution
jmurrayhead agrees: poor, poor, Jim
__________________
- 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).

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationWindows Scripting > VBScript and IIS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway