Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


rangegate
2010-03-18T21:34:10Z
I am looking for a solution to using Microsoft's bitsadmin.exe tool in a scheduled process. It seems to "know" when its user is not logged in and will not execute commands as a result - mainly it will refuse on a "user is not logged in" error.

I have tried running it under VisualCron from a .cmd file. It works fine if and only if I am logged in. The job/task runs with credentials in background mode but still somehow "knows" it does not have the proper context.

Does this product provide any solution for applications like this?

THanks.
Sponsor
Forum information
Support
2010-03-18T21:55:41Z
It depends on what the process does and require. For example, if your process requires desktop access you need to use Foreground execution mode. That will logon the user you specify.

Could you give an example of what you are trying to do (command line etc).
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
rangegate
2010-03-19T01:10:25Z
Thanks Henrik:

Here's the command file I am trying to run. As long as I run the task with my logged-in credentials it works fine - normal bitsadmin behavior.

If I run the task with not-logged-in user credentials, bitsadmin fails to process any further commands. I'll include the log also. In this case I am using a non-logged-in user (local admin), login type: with profile, Run with API Code, and Background Execution.

rem Run a bitsadmin command and log to c:\logs\test.log

bitsadmin /create Job1

bitsadmin /addfile Job1 \\mars\genshare\isos\powerdvd.iso c:\temp\test.iso >> c:\logs\bitslog.txt

bitsadmin /info Job1 >> c:\logs\bitslog.txt

bitsadmin /resume Job1 >> c:\logs\bitslog.txt

bitsadmin /info Job1 >> c:\logs\bitslog.txt

BITSADMIN version 2.0 [ 6.6.3790.1830 ]
BITS administration utility.
(C) Copyright 2000-2004 Microsoft Corp.

Unable to add file to job - 0x800704dd
The operation being requested was not performed because the user has not logged on to the network.

The specified service does not exist.



BITSADMIN version 2.0 [ 6.6.3790.1830 ]
BITS administration utility.
(C) Copyright 2000-2004 Microsoft Corp.

{63A0C2DE-7880-4BA9-BA00-6CBD2E28AF2F} Job1 SUSPENDED 0 / 0 0 / 0

BITSADMIN version 2.0 [ 6.6.3790.1830 ]
BITS administration utility.
(C) Copyright 2000-2004 Microsoft Corp.

Unable to resume job - 0x80200003
There are no files attached to this job. Attach files to the job, and then try again.



BITSADMIN version 2.0 [ 6.6.3790.1830 ]
BITS administration utility.
(C) Copyright 2000-2004 Microsoft Corp.

{63A0C2DE-7880-4BA9-BA00-6CBD2E28AF2F} Job1 SUSPENDED 0 / 0 0 / 0
rangegate attached the following image(s):
rangegate
2010-03-19T02:27:33Z
I did get the process to work in foreground with automated login and logout after I set up on two machines so I could keep the client up on the workstation and watch the job run on the server. Bitsadmin is a user command tool and was never written to be batch scheduled, but Vcron works and saves me from having to write a service in C++ or something like that which would burn many more hours than I care to spend.

rg
Support
2010-03-19T09:07:15Z
In this case, it seems that you should:

1. use option Network Credentials only
2. use a Credential that matches an admin user on "mars" as you are trying to access that path
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top