When EMWProf finishes, it sets the value of the errorlevel variable based on its exit status.
What are those values and what do they mean?
The following bit mask can be used to retrieve the EMWProf completion status from the errorlevel code:
1 EMWP_SUCCESS
2 EMWP_NO_SWITCH_MSG
4 EMWP_SWITCH_ERR
8 EMWP_USER_ABORT
16 EMWP_GLOBAL_ERR
STATUS
RETURN CODE (ERRORLEVEL)
Exit after running in Update mode.
0-Nothing to update.
EMWP_SUCCESS-One or more profiles were updated.
EMWP_NO_SWITCH_MSG-No switch message was found for one or more profiles.
EMWP_SWITCH_ERR-Update failed for one or more profiles.
EMWP_GLOBAL_ERR-Update failed.
EMWP_USER_ABORT-Update was aborted by the user.
Exit after running in Undo mode.
0-Nothing to undo.
EMWP_SUCCESS-One or more profiles were un-done.
EMWP_SWITCH_ERR-Undo failed for one or more profiles.
Exit after creation of a map file.
0-Map file was successfully created.
EMWP_GLOBAL_ERR-Failed to create a map file.
Exit after running in Cleanup mode.
0-Nothing to clean up.\
EMWP_SUCCESS-One or more profiles were cleaned up.
EMWP_USER_ABORT-Cleanup was aborted by the user.
EMWP_GLOBAL_ERR-Cleanup failed.
Note: there might be several profiles to update, so the error code would be a summary of processing all the profiles. For example if two profiles were processed and one was done successfully and the second errored out, then the return code would be 5.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center