Windows service network drive mapping
Show 2 more comments. Active Oldest Votes. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Linked I believe the only way to get a service to use a network drive is for that service to map the drive itself or alternatively for it to us a UNC path instead of a mapped drive. Open an elevated cmd. Then, do psexec -i -s cmd. Why not? My work does this all the time, although I suspect that your user accounts are probably a bit more restrictive than ours, i. Create the account like you would any other user, and provide a logon script like you would any other user - but it's one that's specifically tailored to that account.
Set the machine to auto-logon when powered up , which in turn will run the script, from which the drives are mapped. If you're stuck in a situation where it can't, you'll still need a desktop session to do this - so create a simple service account that is separate from the others, one that has the sole task of logging into a server and providing drive access. Lock down that account to just the drive access for security.
Your other accounts have their own privs and are not related in this manner. Best of both worlds. Related to some comments below, this is being done from a perspective of a Windows XP or setup. Things have changed a bit since then, most people are running Win7 and , both having newer features.
The original question didn't specify what environment was being used, so I can only answer for the one I am familiar with.
Also, the entire need-a-GUI thing is really an artifact of how Windows was sold and marketed, circa 's. Because of this, it has taken a long time, nearly a decade, for Microsoft to come round and create adequate tools for supporting headless environments witness PowerShell and without a GUI.
A common occurance at the time was to simply purchase another machine, log it in, run the service, and stick the box in a corner.
As a result of this mentality of the time, it wasn't uncommon for out-of-control server growth to occur in back rooms, and as a side-effect, the need for more licensing and seats to be purchased. Over the years, this "organic growth method" of installing more and more servers was curtailed as unit cost, power needs, virtualization, and budget-cutting took their toll.
Today, it's merely a faded memory and you really can't find people that remember "the bad old days". Sign up to join this community. The best answers are voted up and rise to the top. Click OK. In your My Computer window you will now see a Network Location section with your drive. Note: Your new drive will remain as a Network Location even after you disconnect from AnyConnect, but clicking on it will result in an error message telling you that the network path was not found.
As soon as you reconnect to AnyConnect, your drive will be accessible again. Enter the terms you wish to search for. Current System Status. View all notices.
0コメント