Processing Logged On Users

Description

Extracting and injecting a currently logged user is a use case that most commonly comes up in smaller environments that don’t have any kind of desktop management tool deployed. In this case there may not even be login scripts being used in which case it may be necessary to make the batch files accessible to the users in the form of a desktop shortcut (or a shortcut placed in the Startup folder for regular backups).

Note
If you are performing an extraction or injection of the currently logged in user's personality, the logged in user must have local administrator rights on the computer.

Many applications don’t write their settings until the user exits the application (most of the Office applications operate this way for instance). For this reason it’s highly recommended that users be instructed to exit all applications before performing a Migration Manager operation.

Process Examples

Migrating the user state for the currently logged on user is a very straightforward process. If you plan on using technicians to upgrade the systems or to deploy a new image to the machine, then the technician can execute the extraction and injection batch files on the user's computer while they are still logged on.

Once the technician begins the extraction or injection process on one machine, they can simply move to the next user’s machine and use the same process. Using a manual process the technician can only perform one migration at a time. However, by automating the process they can perform several extractions and injections in the time it would take to perform a single migration manually.

The process can also be configured to have the users initiate the extraction and injection, but this is rarely very practical as local administrator rights are required to perform any operation with Migration Manager.

Extract.bat File Example

This Extract.bat file can be used for each of the processes mentioned above to extract the currently logged on user. This example assumes that Migration Manager was installed on the server “servername” and that the installation directory is shared as “Migration Manager”.

  1. @echo off
  2. echo Starting extraction...
  3. START /w \\MyServer\MigrationManager\MigrationManager.EXE /autoextract /config \\MyServer\MigrationManager\configuration.xml
  4. IF ERRORLEVEL 1 (echo Extraction failed) ELSE (echo Extraction succeeded)
Line Number Extract.bat File Definition
Line 1 Turns off the screen messages so the user does not see the commands in the batch file and is optional.
Line 2 Display a progress message so the user knows what’s going on.
Line 3 Starts Migration Manager performing an extraction using the specified configuration file and waits for the extraction to complete.
Line 4 Performs a very simple check to see if the extraction succeeded or not (0 means success, anything greater than 0 means an error occurred).

Inject.bat File Example

This Inject.bat file can be used for each of the processes mentioned above to inject to the currently logged on user. This example assumes that Migration Manager was installed on the server “servername” and that the installation directory is shared as “Migration Manager”.

  1. @echo off
  2. echo ...Injecting Personality
  3. START /w \\MyServer\MigrationManager\MigrationManager.EXE /autoinject /config \\MyServer\MigrationManager\configuration.xml
  4. IF ERRORLEVEL 1 (echo Injection failed) ELSE (echo Injection succeeded)
Line Number Inject.bat File Definition
Line 1 Turns off the screen messages so the user does not see the commands in the batch file and is optional.
Line 2 Display a progress message so the user knows what’s going on.
Line 3 Starts Migration Manager performing an injection using the specified configuration file and waits for the injection to complete.
Line 4 Performs a very simple check to see if the injection succeeded or not (0 means success, anything greater than 0 means an error occurred).