PC Review


Reply
Thread Tools Rate Thread

Create a new User Account

 
 
Hudson Gevaert
Guest
Posts: n/a
 
      16th Dec 2003
Hi, I was wondering if anybody new how to create a windows
xp user account from within VB code. I was also curious
how to list all the user accounts on a machine.
Thanks,

Hudson Gevaert
 
Reply With Quote
 
 
 
 
Rob Teixeira [MVP]
Guest
Posts: n/a
 
      16th Dec 2003
NetUserAdd
NetUserEnum

You'll need to use P/Invoke (or the VB Declare statements). The functions
are in Netapi32.dll
Also note that your program needs to run with an Admin/owner account for add
to work.
Specify null (String.Empty) for the server name to create a Local user
(rather than a network/domain user).

-Rob Teixeira [MVP]

"Hudson Gevaert" <(E-Mail Removed)> wrote in message
news:087c01c3c385$bb5b85f0$(E-Mail Removed)...
> Hi, I was wondering if anybody new how to create a windows
> xp user account from within VB code. I was also curious
> how to list all the user accounts on a machine.
> Thanks,
>
> Hudson Gevaert



 
Reply With Quote
 
Hudson Gevaert
Guest
Posts: n/a
 
      16th Dec 2003
That is awesome!! I figured that it had to be an api call
I just could not find the right one.


>-----Original Message-----
>NetUserAdd
>NetUserEnum
>
>You'll need to use P/Invoke (or the VB Declare

statements). The functions
>are in Netapi32.dll
>Also note that your program needs to run with an

Admin/owner account for add
>to work.
>Specify null (String.Empty) for the server name to create

a Local user
>(rather than a network/domain user).
>
>-Rob Teixeira [MVP]
>
>"Hudson Gevaert" <(E-Mail Removed)>

wrote in message
>news:087c01c3c385$bb5b85f0$(E-Mail Removed)...
>> Hi, I was wondering if anybody new how to create a

windows
>> xp user account from within VB code. I was also curious
>> how to list all the user accounts on a machine.
>> Thanks,
>>
>> Hudson Gevaert

>
>
>.
>

 
Reply With Quote
 
Hudson Gevaert
Guest
Posts: n/a
 
      16th Dec 2003
I don't suppose you know how to collect network
information, like in the network places window?
Create it so that it would display workgroups and allow
you to click to view the computers in the selected
workgroup etc.
I was thinking it also was an api call that would return
an enumeration of some sort. If that is the case then how
would I represent that in a listview?

thanks again for any help
>-----Original Message-----
>NetUserAdd
>NetUserEnum
>
>You'll need to use P/Invoke (or the VB Declare

statements). The functions
>are in Netapi32.dll
>Also note that your program needs to run with an

Admin/owner account for add
>to work.
>Specify null (String.Empty) for the server name to create

a Local user
>(rather than a network/domain user).
>
>-Rob Teixeira [MVP]
>
>"Hudson Gevaert" <(E-Mail Removed)>

wrote in message
>news:087c01c3c385$bb5b85f0$(E-Mail Removed)...
>> Hi, I was wondering if anybody new how to create a

windows
>> xp user account from within VB code. I was also curious
>> how to list all the user accounts on a machine.
>> Thanks,
>>
>> Hudson Gevaert

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy a user account & create duplicate account w/new name? +Bob+ Windows Vista General Discussion 2 22nd Dec 2008 01:12 AM
create local user account for network user dave64 Windows XP Configuration 0 1st Apr 2008 03:23 PM
Create User Account For Home Network User Gary Brown Windows XP General 0 3rd Sep 2007 01:24 AM
Can't create a new user account, (xp won't let me) Richard Windows XP Configuration 3 30th Dec 2004 06:08 AM
Can't create user account Harry Ziman Windows XP General 2 15th Apr 2004 09:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:11 AM.