?
Solved

Configure an IIS virtual directory with delphi

Posted on 2003-03-05
6
Medium Priority
?
353 Views
Last Modified: 2013-11-15
I would like to configure an IIS virtual directory programmatically. I want to change the read,write and execute permissions of the directory but I want to do it with delphi. I tried using ADSI but I haven't managed to find a solution. If it is possible, I would like an example showing how a directory is chosen and then how the permissions are set.
0
Comment
Question by:goldy27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 21

Expert Comment

by:ziolko
ID: 8070656
first of all You need: ActiveDs_TLB.pas then look at one of my previouse Qs: http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20138531.html

and some code that might be helpfull:

var web_server: OLEVariant;
    FEnum: IEnumVariant;
    EnumIt: OLEVariant;
    res: LongBool;
    srvIt: IWebServer;
begin
  FMachineName:=Value;
  FItems:=TServers.Create;
  web_server:=_GetObject('IIS://'+Value+'/W3SVC');
  FEnum:=((IUnknown(web_server) as IADsContainer)._NewEnum) as IEnumVariant;
  FEnum.Next(1,EnumIt,Cardinal(res));
  while res do
    begin
      if EnumIt.Class = 'IIsWebServer' then
        begin
          Root.Name - ID of WebSite
          Root.ServerComment - COMMENT
          Root.ADsPat - ADSIPATH
          OleVariant(_GetObject(root.AdsPath+'/ROOT')).Path - PATH
        end;
      FEnum.Next(1,EnumIt,Cardinal(res));
    end;
  VarClear(EnumIt);
  VarClear(web_server);

more about IIS ADSI objects: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/htm/reference.asp

ziolko.
0
 

Author Comment

by:goldy27
ID: 8071974
i don't want to enumerate anything. I want to set permissions to the virtual directory. But it's ok. I found a way.
0
 
LVL 21

Accepted Solution

by:
ziolko earned 300 total points
ID: 8078631
I know, I just tried to show You where to look for what You need
ziolko
0
 

Expert Comment

by:CleanupPing
ID: 9316942
goldy27:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 10033452
Hi!
No comment has been added lately and this question is therefore classified abandoned.

If asker wishes to close the question, then refer to
http://www.experts-exchange.com/help/closing.jsp

Otherwise, I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: ziolko

Please leave any comments here within the next seven days. It is assumed that any participant not responding to this request is no longer interested in its final disposition.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

...Snehanshu
EE Cleanup Volunteer
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
Microsoft will be releasing the Windows 10 Creators Update in just a matter of weeks. Are you prepared? Follow these steps to ensure everything goes smoothly and you don't lose valuable data on your PC.
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question