views:

472

answers:

4

I have a VB6 app that formerly worked perfectly on a Vista machine as a scheduled task, but it will no longer open on the same machine. The app generates export files in a specified folder with no direct output on the screen. I get no errors, no missing references, just absolutely nothing.

The machine is running Vista Business 32-bit, UAC is disabled with a single administrator account, and automatic updates are turned off. The app resides in a non-protected folder, and the export files are put in a folder on the desktop. The client swears that the only change they made to that computer since I installed this app was installing Norton Antivirus, which has never caused problems before with our software.

In addition to the normal VB6 references, the app references Microsoft Scripting Runtime (scrrun.dll), and Microsoft DAO 3.6 (dao360.dll). Both of these files are present and registered on the target machine, along with all the other VB6 dependencies. I added MsgBox statements at the beginning of Sub Main() just to see if anything is being executed, and its not. Disabling Norton yielded no results, nor did reinstalling VB6 runtime to rule out any corrupted libraries. Not once did I get any messages, error or otherwise from my app.

I've never had an issue like this before and I'm completely stumped. Is there anything else that could be causing this?

Edit - The app does not run even when I run it manually, so the part about it being a scheduled task is irrelevant to my problem, sorry for including it.

The user has full administrator credentials, no compatibility mode was needed on the initial test which at the time, was done on this very machine I am having the problem on. For grins I tried compatibility mode for XP and 2000, still nothing.

A: 

Has the user changed their password? That will cause the scheduled task to fail until they re-enter the password on the task.

DJ
No, they have not changed the password. The issue seems to be with the app itself and not the scheduled task part of it.
Heather
A: 

Have you tried running the process directly, instead of as a scheduled task? I'm far from an expert, but it may be that any errors being generated are not showing up because the program is running as a task.

Sukasa
Yes, I have tried running the process directly and it still fails.
Heather
+3  A: 

Try to inspect - if you can access them - the Event Viewer messages. Maybe you will find some tell-tell signs in there...

Valentin Galea
I did not think to check the Event Viewer, thanks for the suggestion.
Heather
Upon checking the event viewer, I found out my program was bailing on a corrupted database file, which happened to be the first file accessed. Fixed the DB file and it works beautifully again! Thank you so much!
Heather
Solved the problem, +1 by definition!
MarkJ
+1  A: 

You could try running the program in Windbg, a free standalone debugger from Microsoft. Compile your VB6 EXE into native code with symbols (create PDB files) and you will be able to debug your application in Windbg.

I would guess one of two things will happen.

  • Windbg will fail to load the EXE. Presumably with an error message that will identify your problem.
  • Windbg will load the EXE, and you can single-step through to see what happens.

Here's a 2006 blog post by a Microsoft guy about using Windbg with VB6, and 2004 blog post by another Microsoft VB guy with a brief introduction to Windbg.

MarkJ
I found my problem without having to resort to Windbg, but thanks for sharing those links. I've encountered other weird things that I've tried using Dependency Walker to trouble shoot but this gives so much more info.
Heather
Glad you solved the problem
MarkJ