How to set up a static drivemapping ?

Hi ! I been trying to setup a drivemapping on a win2k server without the need of a user to be logged on. I have tried to schedule a batchfile (net use blablabla) to be started when the computer start and tried to make a service of the batchfile without any success.

Windows Networking 2246 This topic was started by ,


data/avatar/default/avatar04.webp

314 Posts
Location -
Joined 2000-01-17
Hi !
 
I been trying to setup a drivemapping on a win2k server without the
need of a user to be logged on. I have tried to schedule a batchfile (net use blablabla) to be started when the computer start
and tried to make a service of the batchfile without any success....
 
Anyone know how to do this? A thirdparty app perhaps? If thirdparty it would be great if it was freeware since this is a just a testserver...The server is a
member of a domian and I was planning to use a domainaccount for this mapping.
 
Thanks in advance.
 
/Toby

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic


data/avatar/default/avatar26.webp

362 Posts
Location -
Joined 2000-03-16
You can always use the administrative shares. Like C$...

data/avatar/default/avatar04.webp

314 Posts
Location -
Joined 2000-01-17
OP
Won't work, c$ is just a share like anyone else. Need to logon before connecting to it.
 
The application that runs on the server is a Lotus-server and that shitty piece of crap can't use UNC paths. It can only access the data on another server through a driveletter. I want the share to be mapped without anyone need to be logged on locally.
 
Hope this clear it up a bit
 
Cheers!
 
/Toby

data/avatar/default/avatar19.webp

3857 Posts
Location -
Joined 2000-03-29
I think you can run your mapping batch file at startup via your group policy editor. Open "gpedit.msc", and go here:
 

 
and when you double click on "startup", you will get this window here:
 

 
I haven't fiddled with it, but I was under the impression that this will behave in the manner you are looking for (runs scripts when system launches, not user). The logon/logoff companion to this is under the User Config half below the Windows settings.
 
HTH

data/avatar/default/avatar04.webp

314 Posts
Location -
Joined 2000-01-17
OP
Thanks for the tip !
 
I'll try it tomorrow when I get back to work and I'll let you know how it worked out.
 
/Toby

data/avatar/default/avatar19.webp

3857 Posts
Location -
Joined 2000-03-29
Cool. Good luck.
 


data/avatar/default/avatar04.webp

314 Posts
Location -
Joined 2000-01-17
OP
It did work !
 
The only problem with this method is that there is no way to choose
under what user the script should run. So I ended up with the password i clear text in the batchfile. No big deal, but something to think about when looking trough the ntfs-permissions on the batchfiles.
 
Thanks
 
/Toby

data/avatar/default/avatar05.webp

6 Posts
Location -
Joined 2001-12-19
Personnaly I'd have made it a service using SrvAny.exe (from the resource kit utilities) & a "Cmd.exe c:\path_to\script.cmd". The service would have been running as a domain user account, with access perms to that share.

data/avatar/default/avatar19.webp

3857 Posts
Location -
Joined 2000-03-29
Have you done this before? It sounds like it would actually be launching the running the script under the system account, rather than a user account. Is that something that you can configure separately using srvany (I haven't fiddled with it, but I have adjusted running permissions in other services in the past)?

data/avatar/default/avatar05.webp

6 Posts
Location -
Joined 2001-12-19
Yup I've done this.
Simply configure the server to start using a domain account (restricted to this machine if needed) so it will use this account credentials instead of LOCALSYSTEM built-in acount (which has obviously no access to domain-shared resources)

data/avatar/default/avatar05.webp

6 Posts
Location -
Joined 2001-12-19
Oh, BTW, use instsrv.exe (from sresource kit, still) to install SrvAny as a service. To configure SrvAny.exe, go into the registry and create a _KEY_ named Parameters under the Service's key and two value :
 
Application --> REG_SZ (REG_EXPAND_SZ won't work (dumbass))
Value: C:\WINNT\System32\cmd.exe
 
AppParameters --> REG_SZ
Value: /C C:\Scripts\mapdrives.cmd
 
The script will probably shutdown the service itself (because of /C).
Keep in mind that the credentials used are those associated to the domain user account, so services like RSH will use that credentials to validate permissions to the network drive, files & directories.
 
Anyhow, the domain user account may be also required to open a session on the remote computer (depending if it's a domain controller or not)

data/avatar/default/avatar19.webp

3857 Posts
Location -
Joined 2000-03-29
Cool, I have seen this request before but I only knew of the more advanced scripting policy controls in Win2K (as NT was quite limited). Thanks for the info.