开发者

Accessing UNC file share with credentials in Perl

I am trying to get a Perl scripts to access a file over UNC path using specified credentials. Is this possible? If not with P开发者_开发百科erl, what else could I use?

Thanks

-Jesse


Do you have to access many varied paths with differing credentials or just one?

As non-programming solution can you map the network share to a drive letter permananently in Windows before running your perl program?


Check out the module Win32::NetResource it has methods to allow you to connect to Windows network resources, such as drive shares and supply the credentials.

AddConnection(\%NETRESOURCE,$Password,$UserName,$Connection)

Makes a connection to a network resource specified by %NETRESOURCE
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜