RestoreSession

KCM Core creates a new session and loads its state from a previously saved session. For more information on sessions, see KCM Core sessions.

The command RestoreSession fails if the active job has already been associated with a session.

Syntax

RestoreSession
   Archive(<text>)
   RequireEncryption(True or False);

Parameters

  • Archive: Required. Provides the name of a file in which the state of the session was saved earlier using the command SaveSession.
  • RequireEncryption: Optional. Indicates whether a non-encrypted session archives can be restored. If this parameter is set to True, only encrypted archives are accepted.

Remarks

The command RestoreSession restores the session parameters and files in the directory _sessiondir. You can restore a saved session more than once. Each restored session receives a different unique session identifier.

If the command RestoreSession completes successfully, the variable _restored_session contains the original session identifier of the saved session.

The command RestoreSession validates the validity of an archive before restoring the session. If the archive fails this check, an error is issued and the command RestoreSession fails.