PC Review


Reply
Thread Tools Rate Thread

Application ExitCode

 
 
Jeff
Guest
Posts: n/a
 
      15th Jun 2004
My Question:
Is there anyway to specify an application ExitCode
overriding the one generated by a normal exit?

Situation:
I've created a Windows Script that opens the MDB
application on the local machine and waits for it to
exit, storing the objects exitcode.
In my Access Application, the first action is to compare
the local mdb, to the main one on the server. If the
local version is different, I exit Access, asking the
user to update to the newest version.

I hope to pass back to the script someway means to
determine when to copy the new version of the MDB to the
local machine. Since the script object WScript.Shell RUN
gives me access to the objects EXITCODE it seems the best
way to do it.

Since Access closes without errors, the ExitCode is
always 0. I tried raising an error and exiting, but the
clean exit wipes my error replacing it with a 0.

I've been doing something like this with a "startup" MDB,
that just tests the version, copies the new one if
needed, then opens the application. But this means
starting 2 copies of access every time they open the
application.

Remove the No Spam to email me directly.
Thanks
Jeff


 
Reply With Quote
 
 
 
 
Peter De Baets
Guest
Posts: n/a
 
      15th Jun 2004
Try this link: http://www.granite.ab.ca/access/autofe.htm

Hope this helps,

Peter De Baets
Peter's Software - MS Access Tools for Developers
http://www.peterssoftware.com

"Jeff" <(E-Mail Removed)> wrote in message news:<1ccb201c4530a$503c3d40$(E-Mail Removed)>...
> My Question:
> Is there anyway to specify an application ExitCode
> overriding the one generated by a normal exit?
>
> Situation:
> I've created a Windows Script that opens the MDB
> application on the local machine and waits for it to
> exit, storing the objects exitcode.
> In my Access Application, the first action is to compare
> the local mdb, to the main one on the server. If the
> local version is different, I exit Access, asking the
> user to update to the newest version.
>
> I hope to pass back to the script someway means to
> determine when to copy the new version of the MDB to the
> local machine. Since the script object WScript.Shell RUN
> gives me access to the objects EXITCODE it seems the best
> way to do it.
>
> Since Access closes without errors, the ExitCode is
> always 0. I tried raising an error and exiting, but the
> clean exit wipes my error replacing it with a 0.
>
> I've been doing something like this with a "startup" MDB,
> that just tests the version, copies the new one if
> needed, then opens the application. But this means
> starting 2 copies of access every time they open the
> application.
>
> Remove the No Spam to email me directly.
> Thanks
> Jeff

 
Reply With Quote
 
Jeff
Guest
Posts: n/a
 
      16th Jun 2004
Thank you, I'll check it out.
Jeff

>-----Original Message-----
>Try this link: http://www.granite.ab.ca/access/autofe.htm
>
>Hope this helps,
>
>Peter De Baets
>Peter's Software - MS Access Tools for Developers
>http://www.peterssoftware.com
>
>"Jeff" <(E-Mail Removed)> wrote in message

news:<1ccb201c4530a$503c3d40$(E-Mail Removed)>...
>> My Question:
>> Is there anyway to specify an application ExitCode
>> overriding the one generated by a normal exit?
>>
>> Situation:
>> I've created a Windows Script that opens the MDB
>> application on the local machine and waits for it to
>> exit, storing the objects exitcode.
>> In my Access Application, the first action is to

compare
>> the local mdb, to the main one on the server. If the
>> local version is different, I exit Access, asking the
>> user to update to the newest version.
>>
>> I hope to pass back to the script someway means to
>> determine when to copy the new version of the MDB to

the
>> local machine. Since the script object WScript.Shell

RUN
>> gives me access to the objects EXITCODE it seems the

best
>> way to do it.
>>
>> Since Access closes without errors, the ExitCode is
>> always 0. I tried raising an error and exiting, but

the
>> clean exit wipes my error replacing it with a 0.
>>
>> I've been doing something like this with a "startup"

MDB,
>> that just tests the version, copies the new one if
>> needed, then opens the application. But this means
>> starting 2 copies of access every time they open the
>> application.
>>
>> Remove the No Spam to email me directly.
>> Thanks
>> Jeff

>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What does mean Process.ExitCode = 255 ? SMichal Microsoft C# .NET 2 13th Nov 2006 11:24 PM
What is Process.ExitCode = 255 ? =?Utf-8?B?TWlrZVM=?= Microsoft C# .NET 2 7th Sep 2006 01:16 PM
Process.ExitCode() == 0 =?Utf-8?B?QW5keQ==?= Microsoft C# .NET 4 20th Feb 2006 10:48 PM
RE: Exit and exitcode not set pp Microsoft VB .NET 2 22nd Jun 2004 07:22 PM
vb script during FBA -> (ExitCode: 0x1) Damien Windows XP Embedded 4 18th May 2004 06:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:30 PM.