fpsrvadm to add frontpage extension

I really need help!I'm running IIS 5.0, I have this custom ASP script to add the frontpage extensions to the users web, it isn't working below is the error message and code:

**When executing the script i get this: (the XX are just there to help keep my IPs safe)

Code:
Adding Front Page Extensions 
Results are: Starting install, port: 64.23.XX.XX:80, web: "bob" Error 2 opening registry
key "SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\Ports\Port 80". 
Adding user as author
Results are: Starting security, port: 64.23.XX.XX:80, web: "bob" Error 2 opening registry
key "SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\Ports\Port 80". 
Front Page Extensions added
**BELOW IS THE CODE:

Code:
<%
sub AddFPextensions(username,ipadd)

           'Use ASP Execute as the helper for fpsrvadm     
           Set Executor = Server.CreateObject("ASPExec.Execute")
          Executor.Application = "c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\40\bin\fpsrvadm"
           
           ' Add the extensions
           ' username is needed to insure web gets create with seperate permissions
           Response.write "<h5>Adding Front Page Extensions </h5>"
           Executor.Parameters = "-o install -m " & ipadd & " -p 80 -w " & username & " -u root"
           strResult = Executor.ExecuteDosApp
           Response.write "<h5>Results are: " & strResult & "</h5>"

      

           ' Add the username to the authors list
           Response.write "<h5>Adding user as author</h5>"
           Executor.Parameters = "-o security -m " & ipadd & " -p 80 -w " & username & " -a authors -u " & username
           strResult = Executor.ExecuteDosApp
           Response.write "<h5>Results are: " & strResult & "</h5>"

          set Executor = nothing

end sub
%>

<%
dim user
dim ipadd
ipadd = request.Form("ip")
user = request.Form("username")
 AddFPExtensions user,ipadd
 If Err.Number = 0 then
 Response.write "<h4> Front Page Extensions added </h4>"
 Else
 Response.write "<h3>Adding FP Extensions failed.</h3>"
 Response.write "<h3>The error was " & Err.Description & "</h3>"
 End If
 Err.Clear
%>

 

 

 

 

Top