IIS and VB6

G

Giles

Is there a way for a VB6 program to access IIS Manager without using
sendkeys? Specifically,I want to be able to:
1. Change the Default Web Site Home Directory to a removable Memory Stick
(e.g. f:\)
2. Set write permission to 2 folders which contain access databases (e.g.
f:\db\ and F:\db2\)
This is so my web site can be demonstrated on (localhost) laptops that don't
have an internet connection, without the (untrained) demonstrator having to
access IIS manager - they just run the exe to set up the machine.
 
G

Giles

"Giles" wrote
Is there a way for a VB6 program to access IIS Manager without using
sendkeys? Specifically,I want to be able to:
1. Change the Default Web Site Home Directory to a removable Memory Stick
(e.g. f:\)
2. Set write permission to 2 folders which contain access databases (e.g.
f:\db\ and F:\db2\)
This is so my web site can be demonstrated on (localhost) laptops that
don't have an internet connection, without the (untrained) demonstrator
having to access IIS manager - they just run the exe to set up the
machine.
Should have added: Windows XP, IIS 5.1
 
B

Bob Barrows [MVP]

Giles said:
Is there a way for a VB6 program to access IIS Manager without using
sendkeys? Specifically,I want to be able to:
1. Change the Default Web Site Home Directory to a removable Memory
Stick (e.g. f:\)
2. Set write permission to 2 folders which contain access databases
(e.g. f:\db\ and F:\db2\)
This is so my web site can be demonstrated on (localhost) laptops
that don't have an internet connection, without the (untrained)
demonstrator having to access IIS manager - they just run the exe to
set up the machine.

I don't know. Possibly by WMI ...
You should post to a VB group, .vb.general.discussion, or to the
inetserver.iis group (or both - if you do, please crosspost instead of
multiposting).
 
A

Anthony Jones

Bob Barrows said:
I don't know. Possibly by WMI ...
You should post to a VB group, .vb.general.discussion, or to the
inetserver.iis group (or both - if you do, please crosspost instead of
multiposting).


Actually one of the best places to get this sort of help is the
m.p.scripting.vbscript group. Present it as VBScript question, the port to
VB6 will be a no brainer.

Using ADSI this code will set the path for the root home directory for the
Default Web Site.

Dim moDir

Set moDir = GetObject("IIS://localhost/w3svc/1/root")

moDir.Path = "f:\"
moDir.SetInfo

It is based on the assumption that the default web site has the identity of
1.

However a the chaps in the VBScript group can probably give a complete WMI
based answer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,187
Latest member
RosaDemko

Latest Threads

Top