Are you trying to get the UNC for mounted shares? I don't think it works for shares on your system. I tried getting the UNC for a local share. Nothing. Then I did externals; works fine.
use strict; use warnings; use diagnostics; use Win32::NetResource; my @oth_paths = ("J:\\activeperl", "R:\\McAfee"); map { my $outpath; print "in_UNC : $_ \n"; Win32::NetResource::GetUNCName ( $outpath , $_); print "out_UNC : $outpath \n"; } (@oth_paths);
Output:
Trying to get a local and an external share: D:\Sysad-perl\scripts\Reports\AntiVirus Status\TaskScheduler>prob in_UNC : D:\Public out_UNC : in_UNC : R:\McAfee out_UNC : \\Public\Depot\McAfee Getting two external shares: D:\Sysad-perl\scripts\Reports\AntiVirus Status\TaskScheduler>prob in_UNC : J:\activeperl out_UNC : \\Synnac2\pctools\activeperl in_UNC : R:\McAfee out_UNC : \\Public\Depot\McAfee
In reply to Re: Win32:NetResource problem
by Marza
in thread Win32:NetResource problem
by arkamedis21
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |