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:
Example: To optimize image creation for speed, type:
|
-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.
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:
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: 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
To create an image from disk 2, combine with the -mu switch and type:
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:
To upload a self-extracting executable image file, type:
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:
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:
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:
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.
In this example, you would have two files:
Both of these files must be in the RapiDeploy/FIRM application folder. The FIRM file, firm.txt, could have the following FIRM command:
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:
|
-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:
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:
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:
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:
See also -m[mode], -f[path & file name] |
-m[mode] |
Function: Sets the operating mode. Modes:
Examples: To upload an image, type:
To designate a computer as a Client PC, type:
See also -f[path & file name], -i[IDnumber]. |
-mconv |
Function: Used with the Example: To convert a file named WIN98.IMG, type:
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:
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:
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:
See also -m[mode], -f[path & file name] |
-p[partition] |
Function: Specifies which partition to process. Parameters:
Examples: To upload an image of partition 2, type:
To upload multiple partitions, type:
To upload the BootWorks partition, type:
To upload the oem partition, type:
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:
To restore that file, type:
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:
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:
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:
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:
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:
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:
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:
or
or, if you want to save a list of command-line parameters to a text file, you can use the -text parameter:
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 - 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 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:
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
|
-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
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 |
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?"