Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Automate user access to NT ftp server

Posted on 1998-07-21
5
Medium Priority
?
170 Views
Last Modified: 2013-11-20
I have a server-client application. Server side runs on NT with IIS 3.0. I have 2 questions:

1. How to add users to NT domain from inside my server-side application. I need to dynamically to add or demove users from the machine domain (during run time and based on user input to my application).

2. Is there a way to set the FTP directory and alias from inside my application.

I know that I can do 1 and 2 from NT adminstration programs but I need to do them from my application.

I hope someone will post me a code or show me the API to do that.

Thanks
0
Comment
Question by:khaledo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1319509
I don't think these functions are documented. But if you really want to get to these functions, they are in NETUI0.DLL, NETUI1.dll, and NETUI2.dll. The one that seems the most interesting is NETUI1.dll.

0
 

Author Comment

by:khaledo
ID: 1319510
Thank you Thui, but how can I use them from *.DLL without documentation? If you have experience with them or can show me a sample code it will be great.
0
 
LVL 2

Expert Comment

by:duneram
ID: 1319511
if you have access to a debugger, you can get the gist of how they work by analyzing what gets popped and pushed from the stack when you call them when you experiment.

I know you can direct ftp to run as a script and in the script its possible to use the commands to set your local directory.
0
 
LVL 8

Accepted Solution

by:
trestan earned 600 total points
ID: 1319512
Use the following functions to do your job. Please refer to online help for more information.
The NetUserDel function deletes a user account from a server.
The NetUserAdd function adds a user account and assigns a password and privilege level.

FtpGetCurrentDirectory Retrieves the current directory for the specified FTP session.
FtpSetCurrentDirectory Changes to a different working directory on the FTP server.
0
 

Author Comment

by:khaledo
ID: 1319513
Comment to : trestan

Thnaks for the answer.
The NetUserDel , NetUserAdd functions seem to be what I am looking for in part 1 of my question. I am testing them now.

FtpGetCurrentDirectory, FtpSetCurrentDirectory do not seem to be the functions that I can use to _create_ a new  FTP directory and alias from inside my application.

I will accept your answer for now but I will appreciate any comments about FTP account creation on NT.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question