> I am trying to find a way to get a persistent mount of one machine
> from another and was wondering if it could be done using perl.
> Basically I would like to set up a perl script as a service which then
> will mount a drive and take care of all authentication, etc. whenever
> the machine boots. I want the script to run as Local System, not
> administrator.
>
> How hard is this?
>
> Thanks for our help!
>
> Nikko
No need for Perl.
1) If you map the drive using "net use ..." or the underlying
WNetAddConnection3() call it is visible ONLY to the user, not to
other users. So if you'd map it in a service running as JOE and
loged on as BILL you are not gonna see it.
You have to use "subst" or DefineDosDevice().
But then you can't do the authentication. Do you need to connect
using a different account than the one under which you'll log in?
2) I don't think you can run the "script" as LocalSystem. Try and
see.
3) You should not need to write any script, nor batch. Or even
install some software. I'm doing something like this :
1) Control Panel\Scheduled Tasks\Add Scheduled Task
2) specify you want to run cmd.exe when the computer starts,
change the user account to something that fits you and go to
advanced options.
3) change the command to run to something like
C:\WINNT\system32\CMD.EXE /c subst w: \\server\share\subdir
Reboot & see :-)
Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin