Command-line switches
This section describes the command-line switches that you can use while deploying an image with Ghost and RapiDeploy imaging tools. In most cases, these switches apply to all versions of the Ghost executable. Any exceptions are noted in the switch description.
Table: Ghost command line switches
Table: Command line switches with or without -cns
With-CNS | Without -CNS |
---|---|
Filename .gho | Filename .gho. |
Filename .001 | Filen001.ghs |
Filename .002 | Filen002.ghs |
Table: RapiDeploy Command-line Switches
Command Line Switch | Description |
---|---|
-? | Shows command-line help. |
-bsl:[maximum bandwidth] | 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] | Sets the compression mode for image creation. Default balanced Modes • off (turn compression off) • size (make smallest image size with slight speed penalty) • speed (make a less compressed image in less time) • balanced (make a reasonable compressed image with a reduced speed penalty). Example To optimize image creation for speed, type rdeploy -mu -f[filename] -cspeed |
-cfgfile:[filename] | Sets the configuration filename (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 | Marks 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] | 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] | 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 | 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 | 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 | 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] | 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 | Shows command-line help. |
-i:[20..25] | 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] | Sets session ID when sending an image file to more than one computer. Use this switch with multicast sessions so the Master PC can identify Client PCs in the same session. Example To send an image to 10 Client PCs, 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] | 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, and 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 | Prevents rdeploy.exe from overwriting any existing partitions on the hard disk. |
-kp[1-31] | (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] | 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] |
-makeimx | Minimizes the number of disk swaps that occur when restoring a hard disk image that has been split across multiple CDs or other storage media. This switch causes RapiDeploy to create an .imx (IMage IndeX) file which contains data that may reside on other CDs. If RapiDeploy has access to the .imx file, it will not prompt you to insert any CD more than once. Use the -makeimx switch when you create an image. However, no switches are needed when restoring the image. Once the split image file has been created and you are ready to burn the image to CDs, put the .imx file on the CD with the first .img split image file. Subsequent split image files do not require the .imx file to be placed on the CD. |
-mconv | 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] | Used to specify a migration file. Prompts before overwriting the drive. This is used mainly by PC Transplant Pro. |
-nobw | Makes sure that a BootWorks partition does not exist in the destination, is not on the disk when restoring, and is 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 | Doesn't allow the user to cancel the imaging task. |
-nooem | Makes sure that an OEM partition does not exist in the destination, is not on the disk when restoring, and is 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 | 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) | (NT computers only) Enables a 64K 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] | 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] | 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 | Treats all partitions as raw. The Master PC 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 Technical Support 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. |
-restoresig | Causes RapiDeploy to restore the unique disk signature in the MBR of the hard disk from which the image was created. Normally, RapiDeploy does not transfer the disk signature to the target computer when deploying an image. This switch can be used when restoring an image to the same or similar systems. The -szf switch may be needed in combination with the -restoresig switch. Example One This -restoresig switch has been added to the Distribute Disk Image job in the XP Embedded folder in the Samples folder to protect the Write Filter Partition. It is required for all Restore Image jobs for XPe Thin Clients. Example Two The -restoresig switch is needed when restoring an image to a Citrix Metaframe Server to preserve the alternate drive mappings. In this situation the -szf switch is also required. Note This switch will function only if no production partitions are being preserved on the hard drive when deploying the disk image. |
-s[number of Client PCs] | Specifies the number of Client PCs included in a multicast session. When the Master PC detects the specified number of Client PCs, it automatically starts the multicast session. The number specified does not count the Master PC. Example To set the number of Client PCs that will be connecting to the Master PC in a multicast session to 9 computers, type rdeploy -mdb -f[filename] -s9 See also -m[mode], -f[path & file name] |
-span | 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] | 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 | Use this switch to set 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] | 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 | 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 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] | 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 four, 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 does not support multicasting. If you start one master and nine clients (10 PCs total), three of which are on one side of the router and seven of which are on the other side, RapiDeploy will detect that there are only three on one side of the router and do individual downloads to them. It will also detect that seven 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] | Set VESA screen resolution. Example To set screen resolution to VESA mode 31 (640x480x256), type rdeploy -ve:31 |
-w[n] | When multicasting, specifies the maximum number of minutes to wait for Client PCs to connect. If all Client PCs connect, it will start right away. Default: 5 minutes (or until the specified number of Client PCs is connected). Example To set the timeout to wait for PC Clients to 10 minutes, type rdeploy -w10 -mdb -f[filename] -s9 See also -m[mode], -s[number of Client PCs] |
-x | 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. |