tag:help.appveyor.com,2012-11-13:/discussions/questions/10242-intall-msi-as-adminAppVeyor: Discussion 2018-08-25T02:20:17Ztag:help.appveyor.com,2012-11-13:Comment/436857392017-10-06T15:48:31Z2017-10-06T15:48:31ZIntall msi as admin<div><p>AppVeyor build agent runs with full Administrator privileges on build VM, with UAC disabled. And your commands run in that context. I would recommend to add <code>type install.log</code> to see what happens. Also maybe your msi require restart. In this case I would recommend to leave <code>/norestart</code> option but as next command run <code>sleep 5; restart-computer -f; sleep 5</code> in PowerShell mode. Sleep is needed to let build process to send all tracing to central servers so you see uninterrupted log.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/436857392017-10-06T16:54:44Z2017-10-06T16:58:55ZIntall msi as admin<div><p>Thank you for the quick reply. For reference here is the full script:<br>
$msiPath = "$($env:USERPROFILE)\OpenNI-Windows-x86-2.2.msi" "$msiPath" (New-Object Net.WebClient).DownloadFile(' <a href="https://www.dropbox.com/s/48eksw8252u7yj8/OpenNI-Windows-x86-2.2.msi?dl=0">https://www.dropbox.com/s/48eksw8252u7yj8/OpenNI-Windows-x86-2.2.ms...</a>',<br>
$msiPath) "Running install script" msiexec /i $msiPath /quiet /qn /norestart /log install.log"</p></div>tyler.cartertag:help.appveyor.com,2012-11-13:Comment/436857392017-10-06T16:58:44Z2017-10-06T16:58:44ZIntall msi as admin<div><p>I would remove this part:<br></p>
<pre>
<code>"Running install script"
Start-Process powershell -Verb runas</code>
</pre>
Also check if this msi require restart if you do this interactively and if yes, try restart as I posted before.
<p>Note that you can experiment in <a href="https://www.appveyor.com/docs/how-to/rdp-to-build-worker/">RDP</a></p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/436857392017-10-06T17:00:48Z2017-10-06T17:00:48ZIntall msi as admin<div><p>Oops didn't mean to include the runas line, had just tried that as an<br>
alternative. It doesn't require a restart. I'll try with rdp but any other<br>
suggestions would be great.</p></div>tyler.cartertag:help.appveyor.com,2012-11-13:Comment/436857392017-10-06T17:03:37Z2017-10-06T17:03:37ZIntall msi as admin<div><p>A lot of customers use the same command to install dependencies on the fly. I wonder how you know that it was not installed. Maybe you need to update <code>path</code> environment variable?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/436857392017-10-06T17:18:55Z2017-10-06T17:18:55ZIntall msi as admin<div><p>Firgured it out, had "nuget restore" command before it and apparently was<br>
causing issues.</p></div>tyler.cartertag:help.appveyor.com,2012-11-13:Comment/436857392017-10-06T17:25:38Z2017-10-06T17:25:38ZIntall msi as admin<div><p>Good, thanks for the update</p></div>Ilya Finkelshteyn