Scripting an Elevated Command Prompt?
I have software to install on lots of PC's. It's educational, and thus rubbish. After install, I need to copy a file from our network to the local machine in order to make it work properly. If the command prompt isn't an Administrative one, it returns Access Denied, so I have to install the software and then RC-Run as Administrator on lots of PC's. I don't want to use RUNAS because this would require me putting my password in on each of the PC's and that kind of defeats the object.
I've tried creating a shortcut which runs as an administrator, which works, and launches an Administrative cmd with a mere pressing of a 'Yes' buttom (requiring a left-enter which can be done much quicker than typing a password 30+ times), but I can't seem to find a way to make that prompt automatically run a batch file, so that I can just remotely push the file out to x-amount of PC's and have it install via msciexec.
I've tried a batch file of M:\acmd.lnk "\\Batch Location" but that doesn't work, it just loads up a regular cmd, then an Administrative cmd, but the Administrative one doesn't run the batch file (at "\\Batch Location"). So I tried modifying the location of M:\acmd.lnk to C:\Windows\System32\cmd.exe "\\Batch Location", but that has only the same result, only with just one CMD window this time.
Any ideas? The batch file in question is simply an MSIEXEC and an XCOPY, if it matters.