Hi I looked in the Win32::Lanman documentation. I didn't see anything on "Win32::Lanman::WTSQueryConfig". However, there is a function/method called: "Win32::Lanman::WTSQueryUserConfig". Below is the example shown in the docs:
Kirk if(!Win32::Lanman::WTSQueryUserConfig("\\\\testserver", "testuser", [WTSUserConfigAll()], \%user)) { print "Sorry, something went wrong; error: "; # get the error code print Win32::Lanman::GetLastError(); exit 1; } foreach $key (sort keys %user) { print "$key=$user{$key}\n"; } ----- Original Message ----- From: Lyle Kopnicky <[EMAIL PROTECTED]> Date: Wednesday, June 8, 2005 8:58 pm Subject: Win32::Lanman::WTSQueryConfig not working > Hi folks, > > After much futzing around figuring out how to install > Win32::Lanman on > ActiveState Perl 5.8.3, and searching in vain for usage > documentation, I > finally have the following "best attempt" at getting > Win32::Lanman::WTSQueryConfig to work. Unfortunately, given a > valid > username as an argument, it still produces: > > Failed to query user config info > error = 2 > message = 0 > > I am trying to get the information from the local machine, thus I > left > the server name blank - but I have tried using the actual server > name, > and localhost, qualified hostname, etc. > > The code follows. Any ideas? > > Thanks, > Lyle Kopnicky > > ----------- > > use strict; > use Win32::Lanman; > > my $userName = $ARGV[0]; > my $config; > > if (Win32::Lanman::WTSQueryConfig('', $userName, > [Win32::Lanman::WTSUserConfigAll], $config)) { > foreach (sort keys %{$config}) { > print "$_ => $config->{$_}\n"; > } > } else { > my $error = Win32::Lanman::GetLastError(); > my $errmsg = Win32::Lanman::FormatMessage($error); > print "Failed to query user config info\n"; > print "error = $error\n"; > print "message = $errmsg\n"; > } > > _______________________________________________ > Perl-Win32-Admin mailing list > Perl-Win32-Admin@listserv.ActiveState.com > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Win32-Admin mailing list Perl-Win32-Admin@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs