Hi,
The following script is not working as it adds the domain fine but not as an
IP-less virtual host as its set to. It doesn't add the aliases or any other
switch settings either. Its as if its not accepting any of the switches. We
need a form that a user can fill in an add a domain. Any ideas?
DomainName = Request.Form("DomainName")
HostName = Request.Form("Hostname")
UserName = Request.Form("UserName")
Password = Request.Form("Password")
TopDir = "D:\inetpub\" & Request.Form("UserName")
AddDomain = "D:\IMail\AddDomain.exe"
AddUser = "D:\IMail\adduser.exe"
tmpStr = "HKEY_LOCAL_MACHINE\Software\Ipswitch\IMail\Domains\" & HostName &
"\Users\" & UserName
Response.Write "Attempting to create new Virtual Domain in Imail<br>"
response.flush
Set Executor = Server.CreateObject("ASPExec.Execute")
Executor.Application = "cmd"
Response.Write "Attempting to create new Imail Domain Account <br>"
Executor.Parameters = " /C " & AddDomain & " -h " & HostName & " -a " &
DomainName & " -t " & TopDir & " -i VIRTUAL -u IMail"
Response.Write AddDomain & " -h " & HostName & " -a " & DomainName & " -t "
& TopDir & " -i VIRTUAL -u IMail <p>"
strResult = Executor.ExecuteDosApp
Response.Write strResult & "<p>"
Set Executor2 = Server.CreateObject("ASPExec.Execute")
Response.Write "Creating IMail Host Administrator for " & HostName & "<br>"
Executor2.Parameters = " /C " & AddUser & " -h " & HostName & " -u " &
UserName & " -p " & Password
Response.Write AddUser & " -h " & HostName & " -u " & UserName & " -p " &
Password & "<br>"
strResult2 = Executor2.ExecuteDosApp
response.write strResult2 & "<p>"
Dim tmpWshShell
Set tmpWshShell = CreateObject("WScript.Shell")
tmpWshShell.RegWrite tmpStr & "Flags", "1408", "REG_DWORD"
Response.Write "Converted user " & UserName & " to IMail Host Administrator
<p>"
Set tmpWshShell = Nothing
Thanks,
Randy
To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/