Running a Console VB app as a schedule task

Posted on 2008-10-21
Last Modified: 2010-05-18
I have a console VB application that will run as a scheduled task just fine when scheduled under my account, but fails under any other account.  I tried a dedicated account with Domain Admin rights and it still fails?  Can someone shed some light on what I'm missing.  

Details:  The program just converts some text files to word documents with some formatting of the text prior to converting to .DOC formats....  All in the same folder.

Thanks in advance,

Scott Thomas
Question by:thomashospital
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
  • 4
  • 3
LVL 32

Expert Comment

by:Daniel Wilson
ID: 22769417
If you log in under that Domain Admin account, does it still fail?

You'll probably need to add some logging to figure out where it's breaking ...
possibilities include:
  • Hitting a mapped drive that isn't mapped for that user
  • Read or write rights on any of the folders
  • read or write rights on any share being hit
  • Rights to run Word (assuming you're using Word for the conversion)
  • Word requiring user setup before it will behave -- the classic "enter your initials, put in the CD, do jumping jacks while I decide whether to work for you"

Author Comment

ID: 22769583

I logged in under the Domain account and it worked!  What does that tell me?  I can't leave the server logged on under that account.

Thanks for the help!!!!
LVL 32

Expert Comment

by:Daniel Wilson
ID: 22769646
When you run it under Task Scheduler, does it fail to start?  Or break once it is under way?

some information should be available, when looking at c:\windows\tasks ,  under Advanced | View Log
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.


Author Comment

ID: 22776524
The log only shows the task complete with an exit code of (e0434f4d)
LVL 32

Expert Comment

by:Daniel Wilson
ID: 22776644
OK, that means it did start ... but crashed.

Do you have access to the code to add some logging?  

Otherwise ... is it hitting mapped drives?  those are sometimes quite problematic.

does it pop any message boxes?  In a run-silent scenario those can cause problems ... though they usually result in the thing just waiting, not exiting w/ a funny code.

Author Comment

ID: 22779147
I have the code and can add any logging you would suggest.  Just let me know what you have in mind.
LVL 32

Accepted Solution

Daniel Wilson earned 250 total points
ID: 22779755
At key places in the code I'd put stuff like:

MyLogFunction "got to the place that does X"

MyLogfunction "got to the place that does Y"


I'd also put some error-handling in it and have the error-handler log any error it catches.

Featured Post

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as the high-speed power of the cloud.

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Many of you may be aware of the recent Google Docs scam emails that have been floating around coming from various people that you know. Here's a guide on identifying How To Identify the Scam Email You will see an email from someone you’ve had co…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

695 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