Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1197
  • Last Modified:

How to Access a network drive from 2008 server task scheduler

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
jellydeal
Asked:
jellydeal
1 Solution
 
SagiEDocCommented:
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
 
B HCommented:
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
 
jellydealAuthor Commented:
Worked Great, mapping the drive in VB itself! Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now