Hi,

try the Win32::Lanman functions. 

-- snip --
#!c:\perl\bin\perl.exe

use Win32::Lanman;


$info{type} = &RESOURCETYPE_ANY;
$info{remotename} = "\\\\192.168.2.10\\ipc\$";
$info{username} = "MYSERVER\\AdminUser";
$info{password} = "mypassword";
$info{flags} = &CONNECT_UPDATE_PROFILE;

print "Connection to $info{remotename}\n";

if(!Win32::Lanman::WNetAddConnection(\%info)) {
        print " cannot created! Error: ";
        # get the error code
        print Win32::Lanman::GetLastError();
} else {
        print " successfull created, showing administrative dir c:\n";
        @remote_c = `dir \\\\192.168.2.101\\c\$`;
        foreach $file (@remote_c) {
                chomp $file;
                print "$file\n";
        }
}
-- snap --



regards
Michael Wrzesinski

--
** Michael Wrzesinski, technical consultant
** IBEX AG (www.ibex-ag.de)
** GS Berlin, Alt Moabit 91, 10559 Berlin, Germany
** phon:  0049 30 390810-28
** mobil: 0049 151 12016040



_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to