Instructions for running RapiDeploy from a command line

book

Article ID: 179508

calendar_today

Updated On:

Products

Deployment Solution

Issue/Introduction

 

Resolution

Question
What are the command-line switches for RapiDeploy?

 

Answer

Running RapiDeploy from the command line

You can create and deploy images from the command line using switches. This is useful if you want to run imaging from a batch file and not use the Rapideploy wizard. Switches can be entered in any order and they are not case sensitive. When using multiple switches, leave a space between each option. You can also get a list of switches at the DOS prompt by typing the following: 

rdeploy -?

If you want to redirect this list to a file, type the following: 

rdeploy -? -text > rdparams.txt

The most common command lines for creating an image file is:

rdeploy –mu –fF:\images\imagename.img

The most common command lines for deploying an image file is:

rdeploy –md –fF:\images\imagename.img

RapiDeploy Command-line Switches

The following table lists all the command-line switches that you can use with rdeploy.exe.

RapiDeploy Command-line Switches 

Switch [parameters]

Details

-?

Function: Shows command line help.

-bsl:[maximum bandwidth]

Function: Determines the maximum bandwidth to be used by the multicasting session.

Example: To limit the bandwidth to 5 Megabits per second, type, “rdeploy -bsl:5”.

-c[compression mode]

Function: Sets the compression mode for image creation.

Default: Balanced.

Modes:

  • off (turns compression off)
  • size (makes smallest image size with slight speed penalty)
  • speed (makes a less compressed image in less time)
  • balanced (makes a reasonable compressed image with a reduced speed penalty)

Example: To optimize image creation for speed, type:

rdeploy -mu -f[filename] –cspeed

-cfgfile:[filename]

Function: sets the configuration the filename (the default is lastrun.cfg). The configuration file provides information for post configuration. The default configuration file is lastrun.cfg that can be edited in a text editor with the specific information needed for the computer.


This command is useful if you want to run imaging in a batch file using configuration information saved previously by the RapiDeploy program. (If you select the option to save settings in the RapiDeploy program, a configuration file will be created with the name lastrun.cfg.) You can rename lastrun.cfg and specify it in your batch file to apply configuration settings.

Example: If you have run RapiDeploy and have chosen the option to save configuration settings, you could rename lastrun.cfg to laptop1.cfg and use it in a batch file by typing the following:

 

rdeploy -md -f[filename] -cfgfile:laptop1.cfg

 

You can also put configuration files in a shared directory and load them from the network.

See also -m[mode], -f[path & file name].

-checkdisk

Mark the partitions dirty so that checkdisk will run after the image is restored (works on all file systems).

Note: Post configuration will fail when this switch is used.

Example: rdeploy -mu -f[filename] -checkdisk

See also -m[mode], -f[path & file name].

-d[hard disk number]

Function: Specifies which hard disk to read from or write to, depending on whether you are uploading or downloading. This switch is used for computers that have more than one hard disk.

Default: Disk 1.

Examples:  

To download an image to disk 2, combine with the -md switch and type:

 

rdeploy -d2 -md -f[filename]

 

To create an image from disk 2, combine with the -mu switch and type:

 

rdeploy -d2 -mu -f[filename]

 

See also -m[mode], -f[path & file name].

-f[path & file name]

Function: Used with the -m switch. In upload mode, it specifies the filename and location for storing an image file. In download mode it specifies which image file to restore.

To create (upload) a regular image file, use an .img extension. To create a self-extracting executable image file, use an .exe extension.

Examples:  

To upload an image file to disk g:, type:

 

rdeploy -mu -fg:\images\win98.img

 

To upload a self-extracting executable image file, type:

 

rdeploy -mu -fg:\images\win98.exe

 

See also -m[mode], -f[path & file name].

-forcebw

Function: Forces the BootWorks partition to be restored. Use this switch when using PXE or to overwrite an existing BootWorks partition on the hard disk with the BootWorks partition in the image.

Example: To restore an image and have the BootWorks partition in the image replace an existing BootWorks partition on the hard disk, type:

 

rdeploy -md -f[filename] -forcebw

 

See also -m[mode], -f[path & file name]

-forcegui

Function: Forces the wizard to appear even if it doesn't have to. Use this switch to force the wizard to appear so that you can view or edit settings for each computer.

Example: To restore an image but first view or make changes in the settings, type:

 

rdeploy -md -f[filename] -forcegui

 

See also -m[mode], -f[path & file name].

-forceoem

Function: Forces the OEM partition to be restored. Use this switch to overwrite an OEM partition on the hard disk with an OEM partition in the image.

Example: To restore an image and have the OEM partition in the image replace an existing OEM partition on the hard disk, type:

 

rdeploy -md -f[filename] -forceoem

 

See also -m[mode], -f[path & file name].

-frm:[name]

Function: Specifies a FIRM file that contains a list of FIRM commands to be executed after a restore. A FIRM file is a text file containing FIRM commands to execute.

Example: After a computer has received an image, you can copy a file that is not in the image to the computer. For example, you may want to copy a .CFG file that a computer needs but is not in an image.

 

rdeploy -md -f[filename] -frm:firm.txt

 

In this example, you would have two files:

  • The FIRM file that includes the FIRM command to perform the copy, firm.txt.
  • The file that you want copied to a computer, sample.cfg

Both of these files must be in the RapiDeploy/FIRM application folder. The FIRM file, firm.txt, could have the following FIRM command:

 

copy sample.cfg c:\sample.cfg

In this example, after the image has been received, sample.cfg is copied from the RapiDeploy application folder on the server to the computer in the specified folder.

-h

Function: Shows command line help.

-i:[20..25]

Function: Sets screen resolution. For information on setting VESA modes, see -ve:[31.34].

Example: To set screen resolution to VGA mode 23 (640x480x16), type:

 

rdeploy -i:23

-i[IDnumber]

Function: Sets session ID when sending an image file to more than one computer. Use this switch with multicast sessions so the Master computer can identify Client computers in the same session.

Example: To send an image to 10 Client computers, type:

 

rdeploy -mdb -f[filename] -s9 -i5000001

 

Note: -i500001 is given as an example. This value is an example of what the Deployment Server console would send for a session ID.

See also -m[mode], -s[number of Client PCs], -f[path & file name].

-ip:[n.n.n.n:p]

Function: Sets the multicast IP address and port. This can be used for two purposes:

  1. To allow multicasting through a router that is set up to use a different multicast IP address
  2. To separate multiple multicasting sessions more efficiently

If you are manually running multiple multicast sessions, you can specify a different multicast IP address for each session to allow the NIC itself to filter out unwanted packets from other sessions. This speeds up all sessions involved.

Important: Remember to put the port number at the end of the IP address after a colon.

Example:  

 

rdeploy -mdb -f[filename] -s9 -ip:224.2.0.3:401

 

See also -m[mode], -s[number of Client PCs], -f[path & file name].

-kap

Function: Prevents rdeploy.exe from overwriting any existing partitions on the hard disk.

-kp[1-31]

Function: (Download only) Prevents rdeploy.exe from overwriting a specified partition.

n=partition 1 - 31

Example: To keep partition 2 from being overwritten during imaging, type:

 

rdeploy -md -f[filename] -kp2

 

See also -m[mode], -f[path & file name]

-m[mode]

Function: Sets the operating mode.

Modes:

  • u (Upload image)
  • d (Download image)
  • b (Multicast only)
  • ub (Upload and multicast image)
  • db (Download and multicast image)
  • client (Client mode)

Examples:  To upload an image, type:

 

rdeploy -mu -f[filename]

 

To designate a computer as a Client PC, type:

 

rdeploy -mclient

 

See also -f[path & file name], -i[IDnumber].

-mconv

Function: Used with the -f switch to convert an existing image file (.IMG) to a self-extracting .exe file. (Does not upload or download; just converts the file.)

Example: To convert a file named WIN98.IMG, type:

 

rdeploy -mconv -fwin98.img

 

See also -f[path & file name]

-mig:[filename]

Function: Used to specify a migration file. Prompts before overwriting the drive. This is used mainly by PC Transplant Pro.

-nobw

Function: Makes sure that a BootWorks partition does not exist in the destination, not on the disk when restoring, and not in the image when creating.

Example: To remove an existing BootWorks partition from a hard disk and exclude the BootWorks partition from being downloaded with an image, type:

 

rdeploy -md -f[filename] -nobw

 

See also -m[mode], -f[path & file name]

-nocancel

Function: Don't allow the user to cancel the imaging task.

-nooem

Function: Makes sure that an OEM partition does not exist in the destination, not on the disk when restoring, and not in the image when creating.

Example: To remove an existing OEM partition from a hard disk and exclude the OEM partition in an images from being restored, type:

 

rdeploy -md -f[filename] -nooem

 

See also -m[mode], -f[path & file name].

-noprompt

Function: Prevents any need for user interaction; for example, clicking OK after an error occurs. This is very useful in scripting situations where there won't be a user present to hit a key.

-nt64k

(Download only)

Function: (NT computers only) Enables a 64 KB cluster size with a FAT16 partition. This allows you to resize a FAT16 partition up to 4 GB rather than the normal 2 GB limit.

Example: To change the size, type:

 

rdeploy -md -f[filename] -nt64k

 

See also -m[mode], -f[path & file name]

-p[partition]

Function: Specifies which partition to process.

Parameters:

  • n Number (1–31) uploads the partition (each partition must be designated separately).
  • b images the BootWorks partition (works for both hidden and embedded types)
  • oem images the oem partition.

Examples: To upload an image of partition 2, type:

 

rdeploy -mu -p2 -f[filename]

 

To upload multiple partitions, type:

 

rdeploy -mu -p2 -p3 -p4 -f[filename]

 

To upload the BootWorks partition, type:

 

rdeploy -mu -pb -f[filename]

 

To upload the oem partition, type:

 

rdeploy -mu -poem -f[filename]

 

See also -m[mode], -f[path & file name].

-password:[pwd]

Function: Specifies the image password. Passwords are case sensitive.

Example: To create a password-protected image file, type:

 

rdeploy -mu -f[filename] -password:Altiris

 

To restore that file, type:

 

rdeploy -md -f[filename] -password:Altiris

 

See also -m[mode], -f[path & file name].

-raw

Function: Treats all partitions as raw. The Master computer reads and images a partition by sectors rather than by files. This switch makes the image drive geometry dependent (must have the same heads, cylinders, and tracks as the image source). Used mostly by Altiris Support Services for troubleshooting, or it could be used to make sure that any extra data residing outside of the file system is included in the image.

-s[number of Client PCs]

Function: Specifies the number of Client computers included in a multicast session. When the Master computer detects the specified number of Client computers, it automatically starts the multicast session. The number specified does not count the Master computer.

Example: To set the number of Client computers that will be connecting to the Master computer in a multicast session to nine computers, type:

 

rdeploy -mdb -f[filename] -s9

 

See also -m[mode], -f[path & file name]

-span

Function: Prompts between each piece of an image file (if set when using the -split command), allowing you to insert new media.

Example: To prompt between each file in the image set, type:

 

rdeploy -mu -f[filename] -split:500 -span

 

See also -m[mode], -f[path & file name]

-split:[n]

Function: Breaks an image into multiple files of a specified size during an upload (in megabytes).

Example: To set the file size to 500 MB, type:

 

rdeploy -mu -f[filename] -split:500

 

See also -m[mode], -f[path & file name]

-szf

Function: Use fixed sizing for all partitions. By using this switch, RapiDeploy will use the original sizes that existed on the computer from which the image was created.

Example: If the original size of the partition to be downloaded was 250 MB and you want the destination partition to remain 250 MB, use the -szf switch. If the target disk has 500 MB of free space, you'll have a 250 MB fixed partition and 250 MB of free space.

-sz[parameter]

Function: Resizes partitions during imaging.

Syntax:

rdeploy -sz[#]:[x{m|p}] where # is the partition number and x is the size based on the number of Megabytes or a percentage.

Parameters:

  • [x]m (Resize partitions in Megabytes)
  • [x]p (Resize partitions as a percentage of hard disk size for primary partitions or the percentage of the extended partition for logical drives)

Examples:  

If the size of partition 2 being downloaded is 300 MB and you want it to fit in half of the 500 MB of disk space on the client disk, type:

rdeploy -sz2:50p -md -f[filename]

This resizes the 300 MB partition to 250 MB, leaving the other 250 MB unused. You can set the target size for multiple partitions on the same command-line by including multiple instances of the switch:

 

rdeploy -sz1:200m -sz2:50p -md -f[filename]

 

See also -m[mode], -f[path & file name]

-text

Function: Run in text mode instead of GUI mode. To use this switch, all settings must be specified at the command-line.

Examples:  

rdeploy -md -f[filename] -text

or

rdeploy -mu -f[filename] -text

 

or, if you want to save a list of command-line parameters to a text file, you can use the -text parameter:

 

rdeploy -? -text > rdparams.txt

 

See also -m[mode], -f[path & file name]

-threshold:[n]

Function: This option applies only to the "Restore and Send" (-mdb) mode. We have found that when using a small number of clients, it is faster to perform individual downloads on each client than it is to multicast to all of them. There is a point where it becomes more efficient to multicast than it is to perform individual downloads. This "threshold" is where it becomes faster to multicast than to do individual downloads and can be specified by the -threshold:[n] command line parameter.

 

Depending upon the network environment, this number may vary. You should perform a few tests to pick a good threshold value for your network. It may be a small number, like 4, or it could be much larger, like 15. Once you have found this threshold value, you can specify this number on the command line and then RapiDeploy will, depending on the number of clients that connect, have them do individual downloads or have them multicast.

 

The number [n] specifies the minimum number of clients that will need to connect to the master in order for it to multicast. For example, if you specify -threshold=5, and four or fewer clients connect to the master PC, it will have them all do individual downloads of the image. If five or more clients connect to that master, it will multicast to them. This becomes more important when multicasting across subnets with a router that doesn't support multicasting. If you start one master and 9 clients (10 computers total), 3 of which are on one side of the router and 7 of which are on the other side, RapiDeploy will detect that there are only 3 on one side of the router and do individual downloads to them. It will also detect that 7 are on the other side and multicast to them. RapiDeploy does all of this automatically. All you must supply is the threshold value to let RapiDeploy determine when it should multicast or not.

Example: Suppose you have determined that the threshold value for your network is five. In other words, you have found that multicasting from one master to five or more clients is faster than doing individual downloads to those clients and the master. You could then specify the following threshold value on the command line:

 

rdeploy -mdb -f[filename] -s9 -threshold:5

 

See also -m[mode], -f[path & file name], -s[number of Client PCs].

-ve:[31.34]

Function: Set VESA screen resolution.

Example: To set screen resolution to VESA mode 31 (640x480x256), type

 

rdeploy -ve:31

-w[n]

Function: When multicasting, this specifies the maximum number of minutes to wait for Client computers to connect. If all Client computers connect, it will start right away.

Default: 5 minutes (or until the specified number of Client computers connect).

Example: To set the timeout to wait for computer clients to 10 minutes, type

 

rdeploy -w10 -mdb -f[filename] -s9

 

See also -m[mode], -s[number of Client computers].

-x

Function: Causes the image to be saved as a self-extracting file. This setting will automatically be set if the image file name specified by the -f parameter ends with .exe.

Using Command-line Switches with Executable Images

In rare cases, you might need to use switches with executable image files. Multiple switches can be used on the same command-line. As with other switches, you can use them on the command line or in a batch file.

In addition, you can use the -noprompt switch, which bypasses the default screen that prompts the user before imaging begins.

For example, If you named your self-extracting file “baseimag.exe” when you created (uploaded) it, you would type the following on the command-line or in your autoexec.bat file:

baseimag.exe -noprompt

You can combine this switch with any of the other switches.

For steps to create and deploy an image, see article 20534.

See article

And article 36470, "How do I use the RapiDeploy Linux command line?"