programming-examples/perl/Win32/Network shares.pl

12 lines
366 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
# This following code shares the D:\MyShare directory
%share_def = (
'maxusers' => -1,
'netname' => 'MyShare',
'passwd' => "",
'path' => 'd:/MyShare',
'permissions' => 0,
'remark' => 'This is MyShare',
'type' => 0x00, # directory
);
$status = Win32::NetResource::NetShareAdd(\%share_def, $parm_error);