WIX: Run batch file based on checkbox value with admin right

1

I created a installer using WIX. However, after installing the software, I have a checkbox asking the user whether to run a batch file or not. If the user check the checkbox, the batch file will run.

The batch file needs to be ran as admin right. Is there a way to do this? Thanks.

Stanley

Posted 2015-04-24T09:46:53.383

Reputation: 11

Tried using runas? – Karan – 2015-04-24T20:54:07.003

tried but doesn't seems to work – Stanley – 2015-04-27T00:27:04.733

I tried using "runas /profile /user:administrator cmd /c BachFile,bat" – Stanley – 2015-04-27T00:43:51.293

Answers

0

I know this is a little late... But in order to get a batch file to run as an admin you need to create a shortcut to that file, go to the properties, go to advanced, select run as administrator. I use this constantly on scripts that do multiple installations etc.

Mordax86

Posted 2015-04-24T09:46:53.383

Reputation: 1