Thanks Michael that did it. Still curious as to why it would be :: instead of -> but thanks,

Martin

michael higgins wrote:

Martin Douglas wrote:

It seems as though it is because the module is checking to see if I pass in a reference to a hash but that check is failing (line 439). When I call the ref function on the hash itself it returns fine.

print "True.\n" if (ref(\%hShareInfo) eq "HASH");

Any ideas?

[snip]


use Win32::NetResource; # share creation/permissions

my $sError;
my %hShareInfo = ('path'                => "C:\folder",
                             'netname'            => "foldershare",
                             'type'                => STYPE_DISKTREE,
                             'permissions'        => 0,
                             'current-users'    => 0,
                             'maxusers'        => -1,
                             'remark'            => "Cluster share",
                             'passwd'            => 0);

Win32::NetResource->NetShareAdd(\%hShareInfo, $sError);


Win32::NetResource::NetShareAdd(\%hShareInfo, $sError); ^^

print "Error is: $sError.\n";

The purpose of this code is to share out users home folders during automatic creation of Active Directory accounts. Is there a better way to do this?
Any help would be fabulous, thanks.



HTH

-- mike higgins


--
*****************************************************************

Martin Douglas ([EMAIL PROTECTED])
ITS Network Operations
Information Technology Services
Natural Sciences Centre, Room 209
University of Western Ontario
(519) 661-2111 x81187

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

Reply via email to