-1

I wanted to automate the installation of Adobe Reader DC using an existing executable file (AcroRdrDC1501020060_en_US.exe) present in my local computer with a PowerShell script in non-interactive mode.

My current PowerShell script is:

Start-Process -FilePath "C:\newDir4\AcroRdrDC1501020060_en_US.exe" -ArgumentList "/sAll /rs /rps /msi /norestart /quiet EULA_ACCEPT=YES" -Verb RunAs

But I am facing issues when automating it through Azure DevOps pipeline on a hosted agent.

Issue: Pipeline task is successful

But the software is not installed on the agent.

SamErde
  • 3,324
  • 3
  • 23
  • 42
  • Not a server question and in fact not a question at all. This question may be relevant for serverfault if it’s about rolling out software in a business server environment, but it’s not a good question unless you can describe what you’ve done and how it failed. – Mikael H May 31 '21 at 06:12
  • Have edited , please suggest if any – user14876683 May 31 '21 at 06:49
  • Have you tried to run this command in local system is it working fine?? "C:\newDir4\AcroRdrDC1501020060_en_US.exe" -ArgumentList "/sAll /rs /rps /msi /norestart /quiet EULA_ACCEPT=YES" -Verb RunAs – Arun Thomas May 31 '21 at 09:08
  • yes .... but same with azure devops pipeline powershell script task..... its not though task is successful – user14876683 May 31 '21 at 09:36

3 Answers3

1

If this command is executed in an Administrator terminal, or using an account with administrator privileges you will find the application is able to be installed without a problem.

The other thing that might be holding you up is from experience it's best to install Adobe Reader BEFORE you install any other applications.

I usually would apply the -Wait switch to ensure it's installed successfully before moving on with the next, and start with this installation before making additional changes as Adobe Reader can be difficult for the most part.

I would suggest to try the following command:

Start-Process -FilePath "C:\newDir4\AcroRdrDC1501020060_en_US.exe" -ArgumentList "/sAll /rs /rps /msi /norestart /quiet EULA_ACCEPT=YES" -WorkingDirectory "C:\newDir4" -Wait
0

Depending on your Windows security settings, using the RunAs parameter or the RunAs verb will require credentials to be provided to the script or will even require a UAC prompt to be approved before the command will run.

For example, on my configuration, the -RunAs parameter requires credentials, which would either be an interactive response or provided as a variable in the script. It is not advisable to save the actual credentials in the script, but you can work with a PowerShell secrets provider to pull credentials from a secrets store.

If you use the RunAs verb, the default secure configuration will actually trigger a UAC prompt, which can only be approved interactively.

SamErde
  • 3,324
  • 3
  • 23
  • 42
0
Start-Process -FilePath "d:\batch\install\AcroRdrDC1501020060_en_US.exe" -ArgumentList "/sAll /rs /rps /msi /norestart /quiet EULA_ACCEPT=YES" -WorkingDirectory "d:\batch\install" -Wait -LoadUserProfile

This seems to work to avoid the prompt...