09.02.2014 Views

Windows sysinternals

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

180 Part II Usage Guide<br />

PsExec Command-Line Options<br />

Let’s take a look at PsExec’s command-line options. They control aspects of process<br />

performance, remote connectivity, runtime environment, and whether PsExec should wait for<br />

the target process to exit. Table 6-1 summarizes these options, which are discussed in more<br />

detail after the table.<br />

TABLE 6-1 PsExec Command-Line Options<br />

Option<br />

Description<br />

–d Doesn’t wait for the process to terminate. (This is described earlier in the “Remote<br />

Process Exit” section.)<br />

Process Performance Options<br />

–background<br />

–low<br />

–belownormal<br />

–abovenormal<br />

–high<br />

–realtime<br />

Runs the process at a different priority.<br />

–a n,n… Specifies the CPUs on which the process can run.<br />

Remote Connectivity Options<br />

–c [–f|–v] Copies the specified program from the local system to the remote system. If<br />

you omit this option, the application must be in the system path on the remote<br />

system. Adding –f forces the copy to occur; –v performs a version or timestamp<br />

check and copies only if the source is newer.<br />

–n seconds Specifies timeout in seconds when connecting to remote computers.<br />

Runtime environment options<br />

–s Runs the process in the System account.<br />

–i [session] Runs the program on an interactive desktop.<br />

–x Runs the process on the Winlogon secure desktop.<br />

–w directory Sets the working directory of the process.<br />

–e Does not load the specified account’s profile.<br />

–h Uses the account’s elevated context, if available.<br />

–l Runs the process as a limited user.<br />

Process Performance Options<br />

By default, the target process runs with normal priority. You can set the process priority<br />

of the target process by specifying any of the following on the PsExec command line:<br />

– background, –low, –belownormal, –abovenormal, –high, and –realtime. The<br />

– background option is supported only on <strong>Windows</strong> Vista and newer; in addition to setting<br />

the process priority to Low, it sets the process’ memory priority and I/O priority to Very Low.<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!