use Win32::Lanman;
if(!Win32::Lanman::NetUseAdd({remote => "\\\\server\\share",
password => "xxxxxx",
username => "user.name",
domain => "domain",
local => "h:",
asg_type => &USE_DISKDEV}))
{
print "Sorry, something went wrong; error: ";
# get the error code
print
Win32::FormatMessage(Win32::Lanman::GetLastError());
}
The problem is that I am trying to set up a service which will
a) use the local system account to run
b) be able to map a drive to an external share
c) process files there.
I FINALLY got Win32::Lanman to map a drive under shell control (tried
Win32::NetResource but kept getting unknown username or password
errors). Now, when trying to "map" a drive under service control, I
get(returned from Win32::FormatMessage(Win32::Lanman::GetLastError()):A
specified logon session does not exist. It may already have been
terminated.
I am sure it has something to do with security permissions, just not
sure what to change. I would prefer NOT to run the service directly
under the ID above if possible.
Please reply directly to this email as I am behind(alot) on my digests.
Thanks in advance for any help you can give on this.
Joe Frazier, Jr
Technical Support Engineer
PeopleClick
919-645-2916
[EMAIL PROTECTED]