Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drive Mapping BEFORE Logon question

Status
Not open for further replies.

DSect

Programmer
Sep 3, 2001
191
US
Hello,

I have a quick question, possibly very easy:

How do I map a drive letter to a share BEFORE anyone logs onto a server/PC?

Scenario: I have 2 servers. One is a Stand-Alone Web Server and the other is a PDC/File/Print Server. The stand-alone web server needs a drive mapped because of an ODBC data source that uses a database on the file server.

Everything works fine for now, but if the Stand-Alone (WEB) server resets and no one logs in, then the drive mapping will not take place and consequently leads to an ODBC error.

I would like to be able to establish the drive mapping regardless of someone logging in or not.

Am I correct in thinking that anything placed in the "HKLM\Software\Microsoft\Windows\CurrentVersion\RUN" does not execute until someone logs in (this question is optional)?

Thank you in advance for any help and I am glad that I've finally found a good forum for techies :()
 
if you can find or write an application that maps a drive (a .exe file; you can do it in VB),
then you could register this application as a service (using srvany.exe from the NT4 resource kit) and set it to run automatically... ---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !
 
I found an even easier way to do it.

You can use SRVANY.EXE and INSTSRV.EXE (resource kit programs) to install ANYTHING as a service.

Using those little files and a few reg edits to the new service key, you can start a .BAT file BEFORE anyone logs on.

Here's some details of installing a service using those proggies:

Now - The question is.. Do I get some points for answering my own question?

hehe Thanks for the help, though.

*D*
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top