VB6 "Permission denied" only sometimes - TechRepublic
General discussion
March 20, 2005 at 05:58 PM
semmelbroesel

VB6 “Permission denied” only sometimes

by semmelbroesel . Updated 21 years, 2 months ago

Hi,
I wrote a little VB6 program that is being called by my email server when a certain email comes in. The program is then supposed to access a file on another PC on the LAN and create an email out of that file.

Theoretically it works perfectly, but sometimes when the email server starts the program I get a “Permission Denied” error.
If I start the program by hand it works perfectly.

I am not using any command line parameters – I just start the program, and it does all by itself.

The path is correct and the same in both cases.

Both PCs are running Windows XP.

I tried having the email server start a little program whose only purpose was to start my main program – I wanted to see if there was something in the way that my email server starts the program that would deny it access – that didn’t help either.

I tried multiple ways of accessing the file (pretty much all I could find), and all give the same result. Also, I have not been able to get any query to work that tells me if the target file exists. Usually it works, but not via network.

I don’t think it has to do with my code since I tried multiple approaches, but there has to be something in the Windows permissions etc. that won’t let my program through…

Any ideas?

Thanks!

This discussion is locked

All Comments