Skip to content Skip to main navigation Skip to footer

Running Image for Windows Remotely using Microsoft PsExec

One way to run Image for Windows (IFW) remotely is using the Microsoft utility PsExec.  PsExec is free, simple to use, and does not require you to install client software.  Once the remote system has been configured properly (as outlined below), running IFW with PsExec is done simply by running a command line on the local system.

You may run IFW on a remote system using PsExec without first installing IFW on it.  (This is possible because PsExec has the ability to copy the IFW program to the remote system as part of its processing.)  If you wish to use PHYLock, however, it must always be installed on the remote system beforehand. Because of these considerations, the exact procedure for using PsExec with IFW depends on whether or not IFW and PHYLock are installed on the remote system.

Some basic definitions before we begin: The "local system" is the one from which you will be initiating the PsExec command line.  The "remote system" is the one that IFW will run on to create the image whenever you invoke the PsExec command line from the local system.

Note: PsExec does not support running programs on remote systems running Windows XP Home. This version of Windows lacks some of the required network functionality required by PsExec.


Using PsExec with Image for Windows Installed on the Remote System

  1. If you have not already done so, download the latest version of IFW and install it on the remote system. Then run IFW to enter the license name and key.

  2. Configure IFW as desired using IFW.INI and/or SERVICES.INS. At the very least, the IFW.INI file must contain the license details.

    • When IFW is run from the command line — as it will be when invoked by PsExec — only the global parameters in IFW.INI are used (i.e. those settings specified in the [Options] section).  All other IFW.INI settings will be ignored.  Please refer to the Image for Windows User Manual for more information.

    • If you wish to use IFW.INI settings on the remote system, you can either create and configure the file manually (as described in the Image for Windows User Manual) or run and configure IFW and then use the copy of IFW.INI that it creates for you (this is generally the easiest, assuming the options you need are available in the GUI).  The file must reside in the IFW installation directory on the remote system (the default installation directory is "C:\Program Files\TeraByte Drive Image Backup and Restore Suite" for 32-bit versions of Windows and "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite" for 64-bit versions).

    • If you want to manipulate Windows services on the remote system during the imaging operation, edit SERVICES.INS as needed.  Please refer to the Image for Windows User Manual for more information on controlling services using SERVICES.INS.  If you wish to use SERVICES.INS, it must reside in the IFW installation directory.

  3. Add the IFW installation directory to the system path of the remote system.  Note: This step is not necessary if the complete path to IMAGEW.EXE/IMAGEW64.EXE is specified in the PsExec command (see Example 4 below). Otherwise, this step is necessary for PsExec to find the IFW program.

    The exact steps for this vary slightly depending on your version of Windows and method used:

    1. To use the Control Panel:
      1. Open the Control Panel and run the System applet.
      2. Click the Advanced tab (under Windows Vista, Windows 7, and Windows 8.x/10, click Advanced system settings in the list on the left side).
      3. Click the Environment Variables button.

      To use the Start Menu or Windows Search (Windows 7/8.x/10):
      1. Open the Start Menu or click in the Search box on the taskbar.
      2. Type "environment" into the box.
      3. Run the Edit the system environment variables item.
      4. The System Properties dialog will open with the Advanced tab active.
      5. Click the Environment Variables button.

    2. Under System Variables, locate the environment variable named Path and double-click it (or click it once and then click the Edit... button).

    3. Depending on the version of Windows, the value for the Path variable will either be in an edit box containing all path directories separated by semicolons or listed in a table format with each directory on its own row.

      Windows Vista, Windows 7/8.x, and earlier versions of Windows 10:

      At the very end of the string shown in the "Variable value" text box, add a semicolon followed by the IFW installation directory.  For example, if the path ends with this:

      %SystemRoot%\system32\wbem

      Change it to this (assuming that "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite" is your installation directory):

      %SystemRoot%\system32\wbem;C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite

      Current versions of Windows 10:

      Click the New button and enter the IFW installation directory.

    4. Click OK to save the path change, then click OK to close the Environment Variables window.

    5. Reboot the remote system to put this change into effect.

  4. If you have not already done so, download the latest version of PsTools to the local system, and extract PSEXEC.EXE from the PsTools archive to %WinDir%\system32 on the local system.

  5. Proceed to the section below titled Running Image for Windows with PsExec.

Using PsExec without Image for Windows Installed on the Remote System

  1. If you want to use PHYLock during the imaging of the remote system, you may download a standalone copy of PHYLock and install it on the remote system.

    • If you are unfamiliar with PHYLock, please refer to the knowledge base article titled Introduction to PHYLock.

    • Note: If you will have PHYLock — but not IFW — installed on the remote system, you must ensure that the version of IFW being run on the local system is compatible with the version of PHYLock installed on the remote system.  The best way to do this is to update PHYLock on the remote system whenever you update IFW on the local system, if the PHYLock driver has been updated.  You can tell if the PHYLock driver has been updated when installing the IFW package by whether or not you are prompted to reboot at the completion of the installation.  If you are not prompted to reboot, PHYLock has not been updated.  If you are prompted to reboot, the PHYLock driver has been updated and you should update PHYLock on the remote system as well.

  2. If you are a registered user of IFW, use a text editor to create a file with the following content on the remote system:

    [LICENSE] ProductKey=XXXX-XXXX-XXXX-XXXX-XXXX-XXXX
    User=User Name


    Where User Name and XXXX-XXXX-XXXX-XXXX-XXXX-XXXX represent your own registered user name and key.

    Save the text file as IFW.INI in %WinDir%\system32 on the remote system (which is usually C:\WINDOWS\System32).

  3. If you have not already done so, download the latest version of IFW and install it on the local system.  (The main point here is to obtain the IFW program, IMAGEW.EXE/IMAGEW64.EXE.  Once you have done so as described in a step to follow, you may uninstall IFW, if you wish.)

  4. Configure IFW as desired using IFW.INI and/or SERVICES.INS. At the very least, the IFW.INI file must contain the license details.

    • When IFW is run from the command line — as it will be when invoked by PsExec — only the global parameters in IFW.INI are used (i.e. those settings specified in the [Options] section).  All other IFW.INI settings will be ignored.  Please refer to the Image for Windows User Manual for more information.

    • If you wish to use IFW.INI settings on the remote system, you can either configure the file manually (as described in the Image for Windows User Manual) or run and configure IFW and then use the copy of IFW.INI that it creates for you (this is generally the easiest, assuming the options you need are available in the GUI).  If you wish to use IFW.INI without having IFW installed, it must reside in %WinDir%\System32 on the remote system (again, this is usually C:\WINDOWS\System32). Note: The IFW license information will also need to be in the IFW.INI file (as shown in Step 2).

    • If you want to manipulate Windows services on the remote system during the imaging operation, create and/or edit SERVICES.INS as needed.  Please refer to the Image for Windows User Manual for more information on controlling services using SERVICES.INS.  If you wish to use SERVICES.INS, it must be placed in %WinDir%\System32 on the remote system.

  5. If you wish to uninstall IFW from the local system, first locate IMAGEW.EXE/IMAGEW64.EXE in the IFW installation directory, and copy it to %WinDir%\System32 on the local system.  (The default installation directory is "C:\Program Files\TeraByte Drive Image Backup and Restore Suite" for 32-bit versions of Windows and "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite" for 64-bit versions.)

  6. If you have not already done so, download the latest version of PsTools to the local system, and extract PSEXEC.EXE from the PsTools archive to %WinDir%\System32 on the local system.

  7. Proceed to the section below titled Running Image for Windows with PsExec.

Running Image for Windows with PsExec

Create a shortcut or batch file on the local system for running PsExec.  This is where you will specify the command line parameters for both PsExec and IFW.

  • More information on PsExec command line parameters can be found on the PsExec home page or by running PSEXEC.EXE without parameters.

  • More information on IFW command line parameters can be found in the Image for Windows User Manual.

Here are some example command lines:

Example 1

psexec.exe \\RemoteComputerName -u Administrator -s -c -v "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /b /uy /d:w0@0x1 /f:"D:\Backups\WinBackup" /vb

The command above, which assumes that IFW is installed to "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite" on the local system, will: 

  • Copy "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" to the computer named "RemoteComputerName".  This is the approach you would generally use if IFW were installed on the local system, but not on the remote system.

  • Run IFW, using the specified IFW parameters, as Administrator on the remote computer.  Since the -p parameter was not supplied, PsExec will prompt for the Administrator password.

Example 2

psexec.exe \\RemoteComputerName -u Administrator -p AdminPassword -s -c -v imagew64.exe /b /uy /d:w0@0x1 /f:"D:\Backups\WinBackup" /vb

The command above will:

  • Copy imagew64.exe to the computer named "RemoteComputerName".

  • Run IFW, using the specified IFW parameters, as Administrator on the remote computer.  The password AdminPassword will be supplied.

Example 3

psexec.exe \\RemoteComputerName -u Administrator -p AdminPassword -s imagew64.exe /b /uy /d:w0@0x1 /f:"D:\Backups\WinBackup" /vb

The command above will:

  • Assume that IMAGEW64.EXE can be found in the system path of the the computer named "RemoteComputerName" (note that the -c parameter is not present).  This is the approach you would generally use if IFW were installed on the remote system.

  • Run IFW, using the specified IFW parameters, as Administrator on the remote computer.  The password AdminPassword will be supplied.

Example 4

psexec.exe \\RemoteComputerName -u Administrator -p AdminPassword -s "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /b /uy /d:w0@0x1 /f:"D:\Backups\WinBackup" /vb

The command above will:

  • Assume that IMAGEW64.EXE is installed on the remote system and can be found in the "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite" directory of the the computer named "RemoteComputerName".  This is the approach you would generally use if IFW were installed on the remote system and you did not want to add the IFW path to the Path variable of the remote system.

  • Run IFW, using the specified IFW parameters, as Administrator on the remote computer.  The password AdminPassword will be supplied.

Example 5

psexec.exe \\RemoteComputerName -u DomainName\Administrator -p AdminPassword -s imagew64.exe /b /uy /d:w0@0x1 /f:"D:\Backups\WinBackup" /vb

The command above is identical to Example 3, except that by adding "DomainName\", it uses the domain administrator account, rather than the local administrator account.  Using the Domain Administrator account may be useful in some environments.


Technical Notes:

Running the Remote Process in the System Account

If the remote system is running Windows Vista or Windows 7/8.x/10, you must specify the -s option (as shown in the examples). If this option is omitted, IFW won't be run. This option isn't required for the program to run under Windows XP Professional.

 

Have IFW Run Interactively

If you want to have IFW run interactively on the remote system (have the GUI shown), you can specify the -i option. For example:

psexec.exe \\RemoteComputerName -u Administrator -p AdminPassword -s -i "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe" /b /uy /d:w0@0x1 /f:"D:\Backups\WinBackup" /vb

 

"Access is denied" When Remote System is Running Windows Vista or Windows 7/8.x/10

UAC remote restrictions may need to be disabled. Please see the following Microsoft KB article for more information: Description of User Account Control and remote restrictions in Windows Vista

 

Login Information May Be Required to Access Network Shares

If IFW needs to access any network shares (especially those on later versions of Windows, such as Vista or Windows 7/8.x/10), you may be required to provide the login information. Not providing this information may cause IFW to abort.

Here is an example accessing the \\myserver\backups share using JohnDoe for the user name and pswd1234 for the password:

psexec.exe \\RemoteComputerName -u Administrator -p AdminPassword -s "C:\Program Files (x86)\TeraByte Drive Image Backup and Restore Suite\imagew64.exe"
/login:"\\myserver\backups*myserver\JohnDoe*pswd1234"
/b /uy /d:w0@0x1 /f:"\\myserver\backups\WinBackup" /vb

More information on using /login: can be found in the Image for Windows manual.

Was This Article Helpful?

0