Toby 0 Posted December 10, 2001 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 Share this post Link to post
kgeissler 0 Posted December 10, 2001 You can always use the administrative shares. Like C$... Share this post Link to post
Toby 0 Posted December 10, 2001 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 Share this post Link to post
clutch 1 Posted December 10, 2001 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 Share this post Link to post
Toby 0 Posted December 10, 2001 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 Share this post Link to post
Toby 0 Posted December 11, 2001 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 Share this post Link to post
BenZeKat 0 Posted December 18, 2001 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. Share this post Link to post
clutch 1 Posted December 19, 2001 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)? Share this post Link to post
BenZeKat 0 Posted December 20, 2001 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) Share this post Link to post
BenZeKat 0 Posted December 20, 2001 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) Share this post Link to post
clutch 1 Posted December 20, 2001 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. Share this post Link to post