home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 42,120 of 42,547   
   mike to canope234@gmail.com   
   Re: Batch, run as administrator, UAC, Sh   
   29 Jan 23 07:51:01   
   
   XPost: alt.comp.os.windows-10   
   From: this@address.is.invalid   
      
   On 28-01-2023 22:03 Thomas  wrote:   
   > But if there is no command that tells Windows to run the batch file as   
   > administrator, then at least tell me which of the many batch files it was.   
      
   There is.   
      
   First see if you have secure logon enabled.   
   PS] Get-Service seclogon   
      
   Second enable seclogon if it's not already enabled.   
   PS] Start-service seclogon   
      
   Third take a look at the existing key credentials   
   C:] c:\windows\system32\rundll32.exe keymgr.dll, KRShowKeyMgr   
      
   Fourth save the administrator password into the key credentials store   
   C:] c:\windows\system32\runas.exe /user:administrator /savecred    
   C:\Windows\System32\cmd.exe"   
       Enter the password for administrator:   
      
   Fifth is to run any command as admin without entering any password   
   C:] c:\windows\system32\runas.exe /user:administrator /readcred    
   C:\Windows\System32\cmd.exe"   
      
   Sixth, replace "C:\Windows\System32\cmd.exe" with your batch file   
   C:] c:\windows\system32\runas.exe /user:administrator /readcred    
   C:\yourpath\yourfile.bat"   
      
   https://woshub.com/run-program-as-different-user-windows/   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca