Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

I tried to exceute a third part application through a batch file.
The batch cfiles has contents like below
"C:\Testing\Engine.exe" a

Where "a" is a parameter to be paased.
This batch is called by a VB application through Shell command.

While executing this batch file through shell command in VB application, it logs a error code as 12.
When I searced in google I found that the error code 12 means "Invalid acces code".

When i tried to run the same batch process through other system, there was no such error.

So what exactly is "Invalid access code" means and how is this occuring only to certain computers.

Can you please help me in resolving this issue?
Posted
Comments
Richard MacCutchan 19-May-12 4:26am    
Where does the error occur (in the VB program, Engine.exe or shell), and where is it logged and by whom?
NaveenSoftwares 19-May-12 4:37am    
This error is occuring in VB program while calling the batch file which is logged in a log file
Richard MacCutchan 19-May-12 4:49am    
Why not show the actual VB code that is causing the error?
NaveenSoftwares 20-May-12 23:57pm    
Thanks Richard. I found that the issue was due to access only.

1 solution

The trouble is, that it could be almost anything.
The most likely is that the systems on which it is failing are either Vista or Win 7 and accessing a folder / file to which you do not have the necessary permissions.
 
Share this answer
 
Comments
NaveenSoftwares 20-May-12 23:59pm    
Thanks Griff. It was due to the access issue. The scheduled task which triggers this VB application has some access issue and this caused the Batch file created as the result of VB application, to throw an error as it could not attempt to execute the application within it.
OriginalGriff 21-May-12 3:47am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900