Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   IIS and VB6 (http://www.velocityreviews.com/forums/t803929-iis-and-vb6.html)

Giles 01-12-2008 11:26 AM

IIS and VB6
 
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.



Giles 01-12-2008 11:33 AM

Re: IIS and VB6
 
"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



Bob Barrows [MVP] 01-12-2008 12:34 PM

Re: IIS and VB6
 
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"



Anthony Jones 01-12-2008 03:28 PM

Re: IIS and VB6
 
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> 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




All times are GMT. The time now is 07:56 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.