New topic: 

How to get the full path of local IIS root folder?

<http://forums.realsoftware.com/viewtopic.php?t=47681>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        suibaf          Post subject: How to get the full path of local 
IIS root folder?Posted: Tue Apr 23, 2013 2:12 pm                         
Joined: Tue Dec 16, 2008 9:08 am
Posts: 220
Location: Lecce (Italy)                Is it possible to get the path of IIS 
root folder from coding?
Eg: C:\Inetpub\wwwroot.

I would like to detect it via coding as not everyone set it at the default
folder.
Thanks      
_________________
RB2012R1
My native language is Italian, I'll try to make my posts understandable for 
everybody.  
                             Top                p0wn3d          Post subject: 
Re: How to get the full path of local IIS root folder?Posted: Tue Apr 23, 2013 
4:28 pm                                 
Joined: Sun Oct 28, 2012 4:54 am
Posts: 226
Location: Herts, UK                Try this 

Dim IISpath As string
Dim regItem As RegistryItem = new 
RegistryItem("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp")

IISpath = Str(regItem.Value("PathWWWRoot"))

MsgBox(IISpath)
      
_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar  
                             Top                suibaf          Post subject: 
Re: How to get the full path of local IIS root folder?Posted: Wed Apr 24, 2013 
7:05 am                         
Joined: Tue Dec 16, 2008 9:08 am
Posts: 220
Location: Lecce (Italy)                Hi,

it return "C:\inetpub\wwwroot

but the real path is c:\docs

Thank you very much.

Regards      
_________________
RB2012R1
My native language is Italian, I'll try to make my posts understandable for 
everybody.  
                             Top                p0wn3d          Post subject: 
Re: How to get the full path of local IIS root folder?Posted: Wed Apr 24, 2013 
9:08 am                                 
Joined: Sun Oct 28, 2012 4:54 am
Posts: 226
Location: Herts, UK                dim sh as new shell
sh.execute("C:\windows\system32\inetsrv\APPCMD list vdirs /app.name:")
dim s as string = sh.Result
msgbox(s)
      
_________________
Real Studio 2012 R2
SysInfo
BackTrack Linux/BackBox Linux/Debian Lenny/Windows 7/Windows 8/OpenWRT/OpenBSD
& Yes it's me in the Avatar  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to