Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing net.exe from C++ for Net User command

Status
Not open for further replies.

croc

Technical User
Jan 8, 2002
12
0
0
GB
Hello

I am trying to write a program that accesses the NT command: net user. I want to produce a list of users and then filter results by date last logged onto our network so I can check through for user ID's that have not been active for a certain period of time.

Can anyone tell me how I can access a cmd.exe or net.exe command from a C++ program, i.e. tell C++ to enter the command:

net user /domain >>c:\textfile.txt

Thanks for your help.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top