Solved

How to Access a network drive from 2008 server task scheduler

Posted on 2010-08-16
3
1,145 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
Comment Utility
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:bryon44035v3
Comment Utility
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
Comment Utility
Worked Great, mapping the drive in VB itself! Thanks
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Join & Write a Comment

If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now