Deploy Microsoft Remote Desktop - Auto Update

Hi all,
I’m working on a package to install Remote Desktop Client and allow the package to Auto Update. I have a batch file with this command.

msiexec.exe /i "C:\Applications\RemoteDesktop_1.2.3577.0_x64.msi" /qn ALLUSERS=2 MSIINSTALLPERUSER=1

If I run this batch file as the logged in user, Remote Desktop Installs and it allows the user to update to the latest version without the need for any admin Credentials.

I’ve tried running the batch file in PSADT using this command

Execute-ProcessAsUser -Path "C:\Windows\system32\cmd.exe" -Parameters "/c C:\Applications\RemoteDesktopInstall.bat" -Wait -PassThru

This successfully installs Remote Desktop but does not allow the user to AutoUpdate the package and we get this error.

Product: Remote Desktop -- Error 1310. Error writing to file: C:\Users\xxxxx\AppData\Local\Programs\Remote Desktop\RdClient.UpdateLib.dll.  System error 0.  Verify that you have access to that directory.

Does anyone have any idea why the install using PSADT stops the user from Auto Updating?
Any help is much appreciated.

Can you tell us HOW the PSADT install and the AutoUpdate are triggered?
Is PSADT still running when the update is triggered?

Something is locking the RdClient.UpdateLib.dll

The initial Install completes successfully and PSADT is no longer running.
The AutoUpdate is triggered when you open Remote Desktop.
image

It’s strange that if I run the Batch file on its own. The install works and the Auto Update works.
But then if run the PSADT package to run the batch file (I use psexec.exe for testing) It Installs but the AutoUpdate no longer works

So you install as SYSTEM?

Check the permissions of that DLL, JIC
Does the user have the perms to overwrite it?

FYI: This is NOT a PSADT issue.

Yes PSADT is started as System (Powershell is disabled for our Standard Users)
Which is why I need to use the Execute-ProcessAsUser command to run the batch file.

I’ve checked permissions on this folder C:\Users\xxxx\AppData\Local\Programs\Remote Desktop.
User account and System account have full control and Write Control over the folder and that DLL file

I suspect the Remote Desktop Client itself is locking the dll.

If that’s the case, I cannot help you.

1 Like

yeah I’m not sure what’s going on.
It’s just strange that if I run the batch file outside of PSADT its fine.
But then when running it from PSADT it doesn’t work.
Really appreciate the help though. If you have any other ideas please let me know :slight_smile:

Would you happen to know how to format this command which would remove the need for the batch file.

Execute-ProcessAsUser -Path "$envSystem32Directory\msiexec.exe" -Parameters "/i C:\Applications\RemoteDesktop_1.2.3577.0_x64.msi /qn ALLUSERS=2 MSIINSTALLPERUSER=1"

I can’t seem to get it working and need those three parameters at the end

It looks right to me but if you were going to deliver this via SCCM I would put quotes on the path to the MSI:
Execute-ProcessAsUser -Path “$envSystem32Directory\msiexec.exe” -Parameters “/i "C:\Applications\RemoteDesktop_1.2.3577.0_x64.msi” /qn ALLUSERS=2 MSIINSTALLPERUSER=1"

Q:Why do you install this on a per user basis?