|
-
February 21st, 2006, 04:37 PM
#1
Member
Drive mappings before log on.
I have a question regarding drive mappings and I wonder if any of you can help me.
A developer of ours has written a script that copies some files of the K: drive (a drive mapping to another server) to a specific folder. The server is logged on and locked as a specific user and everything works fine.
The thing I was wondering about is, what if there would be a power outage (for example) and the server reboots. The server would come up again and boot up to the logon screen. But would there at that point be a K: drive? Or will the (persistent) K: drive not be there until a user is logged on?
I think not and I think that therefore the script would fail.
Any thoughts on this?
P.S.
Obviously we would could argue about the way he has written his script, but I'm more curious about whether it would conceptually work...
-
February 21st, 2006, 07:54 PM
#2
How about this.
Reboot the box, don't logon, and see if it works. This is the quickest and most reliable way to determine the answer since none of us have a copy of your script to see precisely what it does.
--Th13
Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden
-
February 22nd, 2006, 07:49 AM
#3
-
February 22nd, 2006, 10:34 AM
#4
Well, think about it.. The drive mapping will be made with the users credentials.. This means the user has to be logged on..
Have the developer change the script so it uses UNC paths.. Schedule the script using the schedular.. Make the schedule run on an account with enough privileges to copy the files..
No drive mappings needed and it would still work eventhough noone is logged on on the console..
Oliver's Law:
Experience is something you don't get until just after you need it.
-
February 22nd, 2006, 02:20 PM
#5
You can't rely on drive mappings. They'll depend on what happens to be defined for the user whose context the script is running in.
The script should be using UNC paths (\\servername\sharename\whatever). Alternatively, use "net use K: /d" and "net use K: \\servername\sharename" at the start to ensure that K: is what you expect.
-
February 22nd, 2006, 09:57 PM
#6
Member
Thanks for your replies.
I've tested and confirmed what you all say... Drive mappings do not exist before logging on.
I've passed the tip of using a UNC path on to the developer.
Thanks again
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|