Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to Access a network drive from 2008 server task scheduler

Posted on 2010-08-16
3
Medium Priority
?
1,191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Accepted Solution

by:
SagiEDoc earned 2000 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

670 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