In the example of SPSS, the following command line needs to be run from C:\Program Files\SPSS as the local administrator-
This is where SCCM 2007 R2 comes in handy. The Run Command Line step has a new option Run this step as the following account. Clicking the Set button allows the credentials of the account to be set. But there is a problem. Credentials can be set in either of these two formats-
-but annoyingly, this format is not supported-
So how can the Task Sequence be told to run the command as the local administrator? Well, it's quite simple - just set the %OSDComputername%\Administrator up as a variable in a separate step before the Run Command Line step.
So, add another step to the Task Sequence of Set Task Sequence Variable. Set the variable name to something memorable, such as RUNASACCOUNTFORSPSS, and set the variable value to %OSDComputername%\Administrator.
In the Run Command Line step, enter %RUNASACCOUNTFORSPSS% as the account to use, and supply the password.
You can then deploy the task sequence to any number of machines and the command line will use the correct credentials. Obviously you need to ensure the local account exists, is enabled, and you have supplied the correct password.