Hello again,
        I'm working with ActiveState Perl and am trying to make use of a Win32 call
to create new users. I'm not having much success. Every time my sub runs it
returns this error: "Overlapped I/O operation is in progress". I am using
the function Win32::NetAdmin::UserCreate(). I setup IIS to operate with
local Admin priv's for the application directory my CGI script resides in.
Any ideas???

Here's my code snippet:

#Create new user
(!createNewUser($user, $pass))? print "Could not create new local user
account!: $^E" : print "Created user account!";

sub createNewUser
{
        my ($user, $pass) = @_;

        %account = {
        homedir => ' ',
        priv    =>  USER_PRIV_USER,
        flags   => UF_SCRIPT | UF_NORMAL_ACCOUNT,
        fullname        => $user,
        comment => ' ',
        logon   => ' '
        };

        #first, check to see if user account exists for some bizarre reason
        #if (! Win32::NetAdmin::UsersExist('', $user))
        #{
                if (Win32::NetAdmin::UserCreate ('0050DA8430C4', $user, $pass, 0,
$account{privs}, $account{homedir}, $account{comment}, $account{flags},
$account{logon}) )
                {
                        return 1;
                }
                else #account creation failed
                {
                        return ;
                }

        #}
}


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to