Auto login user admin with cmd

I am creating a bat file for a user at my company, but when running the bat file it needs admin rights to continue otherwise it will be (access denied) !! Is there any command line so that the bat file can automatically log into admin rights without showing the UAC message !!! thanks everyone


There are few ways to do it, but you must be authenticated first to administrative account (providing username/password on login). First of all I should warn you that UAC is a good thing, it preventing changes to the core of operation system, so disabling it is a very bad idea, but if computer you talking about is isolated from internet (such as CNC workstation), and there just a few authorized people who can use it, you may simply disable UAC:

  1. Click the Start menu. In the search field type UAC.
  2. Click "Change User Account Control settings."
  3. In the window that comes up, move the slider down to "Never Notify."
  4. Click OK and then restart the computer.

but again, I'm pretty sure there might be an easier and more effective solution if you post here your bat file, so we can see what this bat file doing and probably people advise you a better way that disabling UAC.