Task scheduler problem
I wrote a program that extracts data from Quickbooks that is called by a nightly Windows scheduled task. This program and Quickbooks are located on a Windows 10 Pro box that I can remote into. The program opens the Quickbooks company file and writes the data to some CSV files, all of which works fine when I'm remoted in. The problem I've run into is that the Quickbooks company file is located on a mapped drive and when the job runs automatically in the middle of the night the mapped drive isn't mapped and the job fails.
I tried using UNC for the company file but Quickbooks doesn't seem to understand UNC when I try to open the file.
The second thing I've tried is to create a batch file which is called from the scheduler that first maps the drive and then calls my program. Supposedly the ID I'm logging on with has admin rights (I checked, it does) so a simple net use statement should work. I tested this last night and it seemed to work but only that once. When it ran in the middle of the night, no joy, can't find the "R" drive.
If this was a real server I think a script to do this could be created but it isn't. Does anyone have any suggestions?
Last edited by Bob Worsley; 9-Dec-2021 at 08:41 AM.
Bob Worsley
203-249-2633
rlworsley at gmail.com
Do or do not. There is no try. — Yoda