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:
<% dim obj Set obj = server.CreateObject("esegui.funcEsegui") Response.Write("Error Code: " & obj.runexe(server.mappath("eseguiftp.exe"))) %>
the dll code is this:
VB Code:
Option Explicit Public Function RunExe(ByVal Filename As String) As Long On Error Resume Next Shell Filename RunExe = Err.Number End Function
On the server I have "eseguiftp.exe" with this code:
VB Code:
Private Sub Form_Load() Shell "CMD.exe /c MD C:\WEBDIR\FTP\myuser", vbHide Shell "CMD.exe /c cacls c:\webdir\ftp\myuser /R USERS /e", vbHide Shell "CMD.exe /c cacls c:\webdir\ftp\myuser /G myuser:f /E", vbHide Shell "CMD.exe /c net user myuser mypwd /add", vbHide End 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?


Reply With Quote