title: Run Executable File Without UAC Popup as Administrator
body: <p>I am running a large study where we have staff in various countries collecting information on tablet computers running Windows 10 Enterprise.  Each staff member is assigned to a tablet and they log into the tablet with their standard username and password.  These users do not have local admin rights on the machines, but all tablets have a single Administrator Username and Password which I know and these are uniform across the tablets.</p>
  
  <p>Each night, users invoke a program on their tablets that uploads data to our servers and then we pass information back to the tablet during this synchronization process.  Otherwise, they are disconnected from the internet.  At the end of the synchronization process a program is executed that allows me to run any script I like, but the script executes under the standard user account (i.e. without elevated privileges).</p>
  
  <p>I need to update all the tablets with a bug fix for software that they use on the tablets and I'd like to do this during the synchronization process.  The bug fix is contained in a simple executable file that can be easily pushed to the staff memebers' tablets along with any code I like during the sync.  If users were running the synchronization program as administrators, this wouldn't a problem as I could simply run the executable via a script at the end of the synchronization.  But they aren't, so I'm trying to find a way that I could run a script (I don't really care what it is.  It could be a windows batch file, a vbs script, VB.NET, powershell, etc.) and have that script execute with administrative privileges and run the installation without the UAC prompt interfering.</p>
  
  <p>I don't even mind supplying the admin password in plaintext to be honest, since these users are all our employees and they can't really do anything really concerning to us with it (and I could always deploy a subsequent file through the synchronization process to delete the program that has the password in it).  I realize this sounds somewhat complicated, but in a nutshell, I'd like to carry out these steps:</p>
  
  <ol>
  <li>Send the bug update executable to the tablet computer (I can do this now)</li>
  <li>Develop custom code, that will pass admin credentials to the tablet and install the executable in 1 without having the UAC appear (I can send the script to the tablet during sync but do not know how to execute it as the Admin without getting the UAC prompt).</li>
  </ol>
  
  <p>Any ideas how I can do this?  I've explored this all day with minimal success using PowerShell scripts like the ones described <a href="https://stackoverflow.com/questions/12693327/running-a-powershell-script-as-administrator-without-typing-in-passwords">here</a> and <a href="https://social.technet.microsoft.com/Forums/windowsserver/en-US/132e170f-e3e8-4178-9454-e37bfccd39ea/startprocess-verb-runas-credential?forum=winserverpowershell" rel="nofollow noreferrer">here</a>.  This was the closest I got after storing the credentials in <code>$cred</code>, but it continued to give me the UAC prompt:</p>
  
  <pre><code>Start-Process PowerShell.exe -Cred $cred -ArgumentList '-command &amp;{Start-Process -FilePath C:\MySyncPath\BugFix32.exe -Verb runas}]
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>After some additional work, I think I'd be able to get this to run if I could somehow disable to UAC control with a script that can run under the regular user's account and pass the admin credentials to it.  Any idea how I might be able to accomplish this?  If I could get this to work, even with a reboot, I'd be able to accomplish what I need.</p>