Solved

How to Access a network drive from 2008 server task scheduler

Posted on 2010-08-16
3
1,170 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

830 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