At 05/16/2001  08:58 AM, Ryan, David wrote:

>Thank you very much for the reply, but I still have the same question.  What
>value do I set $scriptPath to so that it will delete the existing value in
>UMFD?  Neither undef, " ", "" or anything else I have tried mimics the
>manual action of entering UMFD and deleting the existing value.  Thanks
>again.

I don't use NetAdmin much as I prefer Win32API::Net.  I tested the 
following code and I was able to delete the script path.  As far as I can 
determine, the following code will delete the script path the same as using 
UMFD.  This is only for a single user but you could enumerate the users in 
the same fashion you did with NetAdmin.

rotaiv.

# Begin sample code

use Win32API::Net qw(UserGetInfo UserSetInfo);

# Change <server> to a PDC or BDC
$server='\\\\<server>';

# Change <userid> to your test user
$user_id='<userid>';

# Retrieve extended settings
UserGetInfo($server, $user_id, 3, \%acct_info) || die;

# Reset login script path
$acct_info{scriptPath}='';

# Save extended settings
UserSetInfo($server, $user_id, 3, \%acct_info, $error) || die;

# End sample code

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin

Reply via email to