0

I tried to install Firefox, (just as a test example), from a batch file, but the installation prompted for the Administrator username and password.

I tried this batch script but it doesn't work.

set "username=administrator"
set "password=password"
call "\\Applications\DRIVERS\Firefox-Setup_EN_33-0-1.exe
CScript //nologo //E:JScript "%~F0" "%username%{tab}%password%{enter}"
goto :EOF
Compo
  • 36,585
  • 5
  • 27
  • 39
Lynus
  • 11
  • There are many sites dedicated to providing the silent non interactive install options for software. Each installer tends to have specific options, but you'd need to research each program individually. The latest Firefox installers I think use the `-ms` option, _but I'm not interested in providing an installation method for a piece of test software which is almost three years old_. – Compo Oct 12 '17 at 11:04
  • You can't automate the UAC dialog. You'll need to run the batch script as administrator. – Harry Johnston Oct 12 '17 at 13:23
  • 1
    Possible duplicate of [How can I auto-elevate my batch file, so that it requests from UAC administrator rights if required?](https://stackoverflow.com/questions/7044985/how-can-i-auto-elevate-my-batch-file-so-that-it-requests-from-uac-administrator) – Harry Johnston Oct 12 '17 at 13:23
  • to run batch in administrator UAC dialog pops up ,thats the problem – Lynus Oct 15 '17 at 11:40

0 Answers0