I don't know if this is the right section, but here's my problem.

I need to create ftp users on my server windows 2003 from a client pc.

I made an asp page that calls a function of a dll written by me.

VB Code:
  1. <%
  2.  
  3. dim obj
  4. Set obj = server.CreateObject("esegui.funcEsegui")
  5.  
  6.  
  7. Response.Write("Error Code: " & obj.runexe(server.mappath("eseguiftp.exe")))
  8.  
  9. %>

the dll code is this:
VB Code:
  1. Option Explicit
  2.  
  3. Public Function RunExe(ByVal Filename As String) As Long
  4. On Error Resume Next
  5.  
  6. Shell Filename
  7.  
  8. RunExe = Err.Number
  9.  
  10. End Function


On the server I have "eseguiftp.exe" with this code:

VB Code:
  1. Private Sub Form_Load()
  2.    
  3.     Shell "CMD.exe /c MD C:\WEBDIR\FTP\myuser", vbHide
  4.     Shell "CMD.exe /c cacls c:\webdir\ftp\myuser /R USERS /e", vbHide
  5.     Shell "CMD.exe /c cacls c:\webdir\ftp\myuser /G myuser:f /E", vbHide
  6.     Shell "CMD.exe /c net user myuser mypwd /add", vbHide
  7.    
  8.     End
  9.    
  10. End Sub

Now, when I open the asp page, on the server "eseguiftp.exe" is run, it creates the folder "myuser", but it doesn't add the user "myuser".

If I run "eseguiftp.exe" directly on the server by double-clicking it, all works.

Where is the mistake?