How to add WinXP users from C++ app?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Master Ar2ro (Ar2ro_at_go2.pl)
Date: 12/27/04

  • Next message: Bradley1234: "Re: Vc++ with mscom control does not execute in windows xp"
    Date: Mon, 27 Dec 2004 20:37:18 +0100
    
    

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    I'm writing an application under WinXP in MSVC .NET 2003 and don't know
    how to add a user to windows from my application.
    Right now, I'm using a batch file with the following command:

    net users %1 %2 /ADD /FULLNAME:"%3 %4" >> c:\temp.txt

    and then I check what did it output to temp.txt. That's all because
    ShellExecute returns absolutely no information on whether the command
    added the user or not, but this doesn't always work and uses the net.exe
    appliation. Is there a way to add a user directly from my application
    through any function or include library?

    - --------------------
    ~ Artur "Master Ar2ro" Matuszewski
    ~ http://www.hmg.xx.pl
    ~ GG: 5412871
    ~ ICQ: 324085219
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.5 (MingW32)

    iD8DBQFB0GRusfKwBYGio4MRAgj0AKCKjHKiYN1K0TbjfvRbosuQ8/QEDACeNQ99
    4evRmXGUW+0xny0lAy686Rk=
    =IBl7
    -----END PGP SIGNATURE-----


  • Next message: Bradley1234: "Re: Vc++ with mscom control does not execute in windows xp"
  • Quantcast