Solved

How to Access a network drive from 2008 server task scheduler

Posted on 2010-08-16
3
1,162 Views
Last Modified: 2012-05-10
HI,

I have some VB .exe's running on a 2008 server. They copy files between the local server and a mapped network drive. The problem is the Map does not seem to exist when Im logged off and the scheduler runs the task.

Is there a way I can make the MAP available to these scheduled tasks?
Currently I have the maps created by the administrator account.

Thanks!
Baz
0
Comment
Question by:jellydeal
3 Comments
 
LVL 13

Accepted Solution

by:
SagiEDoc earned 500 total points
ID: 33444485
You could just change the script to copy from "\\server_name\c$\folder_name" then you would not need to map the drive itself. Alternatively include this in your vbs file to map the drive when the script runs:
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "H:" , "\\servername\folder"
0
 
LVL 24

Expert Comment

by:B H
ID: 33444493
sure, you'll need to edit the script so that the mapped drives are created.

if you're only running EXE files, then you'll need to create a batch file like this:

net use x: \\server\share
net use y: \\server2\share2
start whatever.exe

then schedule the batch file to run whenever you want

(where x and y are whatever drives you want to use, and server/server2 share/share2 are whatever path the mapped drive should have)
0
 

Author Closing Comment

by:jellydeal
ID: 33450496
Worked Great, mapping the drive in VB itself! Thanks
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OfficeMate Freezes on login or does not load after login credentials are input.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question