1

I am developing Windows installation on a local computer with unattended answer file and use setup.exe. In the unattended.xml I am adding a user X with a password. I want to add a script to the installation. The script does cipher to my files in a specific folder c:\cipherfiles, and I want to run that command under user X (that user X will have the certificate for this folder).

running it using SetupComplete.cmd, LogonCommands\AsynchronousCommand, Microsoft-Windows-Setup\RunAsynchronousCommand or RunSynchronousCommand didn't work.

any idea how should I do it ? Thanks

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
user1902346
  • 799
  • 1
  • 12
  • 21

1 Answers1

0

Ain't a job for "RUNAS" ?

runas /user:$username <program>

or

runas /user:$username@$domain <program>

I think including this on your SetupComplete.cmd would be enough.