IIS and VB6
am 12.01.2008 12:26:40 von 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.
Re: IIS and VB6
am 12.01.2008 12:33:19 von 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
Re: IIS and VB6
am 12.01.2008 13:34:08 von reb01501
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.
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).
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Re: IIS and VB6
am 12.01.2008 16:28:13 von Anthony Jones
"Bob Barrows [MVP]" wrote in message
news:O2cL7dRVIHA.3556@TK2MSFTNGP02.phx.gbl...
> 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.
>
> 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.
--
Anthony Jones - MVP ASP/ASP.NET