I have
just tested the following code using W2K SP2 Pro and Lanman version 1.09 from
05/24/2001 on Perl build 626. The Terminal server properties for the account
still existed after the NetUserSetInfo.
use
Win32::Lanman;
if(Win32::Lanman::NetUserGetInfo("\\\\server", "acct", \%info))
{
$info{'script_path'} = "test.bat";
if(Win32::Lanman::NetUserSetInfo("\\\\server", "acct", \%info))
{
print "set\n";
}
else
{
print "Failed\t" . Win32::Lanman::GetLastError();
}
}
if(Win32::Lanman::NetUserGetInfo("\\\\server", "acct", \%info))
{
$info{'script_path'} = "test.bat";
if(Win32::Lanman::NetUserSetInfo("\\\\server", "acct", \%info))
{
print "set\n";
}
else
{
print "Failed\t" . Win32::Lanman::GetLastError();
}
}
I have
also tested NetUserSetProp
use
Win32::Lanman;
if(Win32::Lanman::NetUserSetProp("\\\\server", "acct", {'script_path' => "more.bat"}))
{
print "set\n";
}
else
{
print "Failed\t" . Win32::Lanman::GetLastError();
}
if(Win32::Lanman::NetUserSetProp("\\\\server", "acct", {'script_path' => "more.bat"}))
{
print "set\n";
}
else
{
print "Failed\t" . Win32::Lanman::GetLastError();
}
Both
worked properly for me. the Terminal Server Profile Path remained
intact.
-----Original Message-----
From: Bingham, Robert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 09, 2001 9:56 AM
To: Bullock, Howard A.; [EMAIL PROTECTED]
Subject: RE: Bug in Lanman module?The machine it is executing from is a W2K box. The target of course is an NT 4.0 PDC.
-----Original Message-----
From: Bullock, Howard A. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 09, 2001 12:30 AM
To: Bingham, Robert; [EMAIL PROTECTED]
Subject: RE: Bug in Lanman module?On what OS are you executing your script? I know that methodology employed by Usrmgr for Win9x resulted in the deletion of the WTS properties as well.-----Original Message-----
From: Bingham, Robert [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 08, 2001 6:11 PM
To: [EMAIL PROTECTED]
Subject: Bug in Lanman module?Using NetUserSetInfo to change the login script path, I have found that the Terminal Sever profile path and Terminal Server Home directory get wiped out. Odd, since the module has WTSSetUserConfig as a separate call. Anyone have any experience with this?
