• Welcome to Support Forum: Get Support for Patch My PC Products and Services.

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Adam Cook (Patch My PC)

Quote from: swoonhusker on March 24, 2022, 09:55:44 AM
It looks like when I run the 64 bit Teams install it puts the folder in Program Files (x86), but that Run registry key is pointing to the Program Files folder I attached a screenshot. Is this a mistake by Microsoft?

No, because as far as I know it's in the WOW6432NODE key path of the registry so it will resolve to the Program Files (x86).

I can actually reproduce this. Teams isn't starting for me.

In my %LocalAppData%\SquirrelTemp\SquirrelSetup.log I saw the below whenever I logged on, and when I tried to ran the command line in the Run key manually:

Quote2022-03-24 10:08:45> RegistryService: RegKeyExists: HKEY_CURRENT_USER\Software\Microsoft\Office\Teams has PreventInstallationFromMsi. Data - 1

I had to delete the registry value PreventInstallationFromMsi under the key the log references in order for Teams to start. Does this work for you too? I was testing on Windows 11 which does come with the new 'home' Teams app - I wonder if that's relevant.
You could deploy it as a proactive remediation script in Intune, or package it in a custom Win32 package - both could work. I think the former might be easier.

It's general enough to work with any software that appears in the registry ARP keys and has an UninstallString registry value with data in it. It could do with some improvements, eg accept wildcard for -DisplayName parameter, and perhaps also look for QuietUninstallString registry value, too.
Microsoft Teams generally creates a Run reg value for all users to execute Teams for each logon. You can learn more about the Run / RunOnce registry keys here if you're unfamiliar: https://docs.microsoft.com/en-us/windows/win32/setupapi/run-and-runonce-registry-keys

To my understanding, Microsoft Teams creates the following Run registry value (see below image). Do you see this on your devices after installing Teams?

It doesn't need to have execution policy set to bypass, only if your devices have an execution policy configured where they can only run PowerShell scripts if they're signed by a trusted certificate. More information here:

I think this is similar to your other forum post. I think you'll need to be looking at a custom pre uninstall script. You could consider this community made script: https://github.com/PatchMyPCTeam/Community-Scripts/blob/main/Uninstall/Pre-Uninstall/Uninstall-Software/Uninstall-Software.ps1

You could attach your custom script as a pre-uninstall script to the app in our catalogue that you do want to uninstall.

Products in our catalogue with the naming convention of "... (User)" in the title would be user-based packages.
If you wanted a solution right now, you could use this community script: https://github.com/PatchMyPCTeam/Community-Scripts/blob/main/Uninstall/Pre-Uninstall/Uninstall-Software/Uninstall-Software.ps1

I wrote it so let me know if you have any questions.
They execute in the same context as the apps/updates which is generally NT AUTHORITY\SYSTEM, unless you choose a user-based app then it'll execute in the user's context.
Hey Matthias,

Unfortunately we can not provide support for writing custom scripts.

My advice is to avoid querying the Win32_Product WMI class as this forces every product on the system to reconfigure/reinstall itself. Here's an article I found online you might find useful for more reading on that: https://xkln.net/blog/please-stop-using-win32product-to-find-installed-software-alternatives-inside/
I asked internally if anyone has heard similar issues with Google Chrome and the answer was no. I recommend reaching out to Google as this sounds like an issue with their software, or perhaps your environment somehow in some way.
Hey Joe

Thanks for sharing that.

The OneDrive installer in our catalogue is only supported for system-wide installations. The installation you have on your device is per-user. Therefore it makes sense the uninstall assignment evaluated as not applicable / required because it deemed OneDrive to not be installed (it was looking in HKLM, yours is in HKCU).

I just tested to see if we can support user-based OneDrive in our catalogue, and this does indeed look possible on initial testing. May you raise this as an idea here on our uservoice? https://ideas.patchmypc.com/ and share the link once created. I'll look to getting it added to the catalogue. I appreciate your use case here.
Please share all the files, you can upload to patchmypc.com/share privately if you wish, or email them to [email protected].
Quote from: joeOPD on March 13, 2022, 07:47:49 AM
I'm trying to uninstall Onedrive for all of our machines.  We're using Intune and it's the version of OneDrive that comes with Windows 10.  In Intune, it always comes up with, "not installed".

Thoughts on how to remove this?

May you run the following on an exmaple device and share the .csv it produces? https://github.com/PatchMyPCTeam/CustomerTroubleshooting/blob/Release/PowerShell/Export-PMPCUninstallRegistryHives.ps1

May you also share all of the below with me from an example device, too, please?

  • %ProgramData%\PatchMyPCIntuneLogs\PatchMyPC-ScriptRunner.log
This may be found in the %ProgramData%\PatchMyPC\ if the Install was initiated by the user from Company Portal.
  • %ProgramData%\PatchMyPCIntuneLogs\PatchMyPC-SoftwareDetectionScript.log
  • %ProgramData%\PatchMyPCIntuneLogs\PatchMyPC-SoftwareUpdateDetectionScript.log
  • %ProgramData%\Microsoft\IntuneManagementExtension\Logs\AgentExecutor.log
  • %ProgramData%\Microsoft\IntuneManagementExtension\Logs\IntuneManagementExtension.log

All of this information will help me understand why the uninstall assignment evaluated as not required / not installed.
This update was added to our catalogue March 7th, kindly see this release article: https://patchmypc.com/patch-my-pc-catalog-update-03-07-22
Quote from: peter.caldwell on March 06, 2022, 12:13:12 AM
We are trying to deploy Webex within Intune and wish to add the ENABLEOUTLOOKINTEGRATION=1 ALLUSERS=1 arguments to the install command.

Webex doco states

When installing Webex App, if you have administration access privileges, you can specify that Webex App will register with Microsoft Outlook for presence integration with Windows using the ENABLEOUTLOOKINTEGRATION=1 property. If you don't specify the property option, the default value is set as false.

Specify that Webex App will register with Microsoft Outlook for presence integration on Windows.

For example: msiexec /i c:\work\Webex.msi ENABLEOUTLOOKINTEGRATION=1 ALLUSERS=1.

Users can select or deselect the checkbox in Settings themselves.

I have right-clicked the Webex Install package inside Patch My PC and selected 'Modify Command Line'


If I check in Intune I only see 'Install command 'PatchMyPC-ScriptRunner.exe /InstallPackage'
If I Check show package info, the install command is 'AUTOOC=0 ALLUSERS=1 ACCEPT_EULA=TRUE REBOOT=ReallySuppress /qn'

Any Advice would be much appreciated


Hey Pete,

It is expected you will not see the new command line parameters in the Intune console next to 'Install Command:' - any parameters you add via right click option 'Modify command line' actually writes the new switches to a file called Package.xml. This content is included within the .intunewin when we upload to Intune and it's ingested by PatchMyPC-ScriptRunner.exe so it knows what parameters to pass to the installer.

Therefore I recommend right clicking on the product in Patch My PC, choose 'Republish during next scheduled sync cycle' and sync the Publisher: this will delete and recreate the package in Intune with new content (containing your new switches). Unfortunately Intune does not let you browse around inside the .intunewin file once it is uploaded (however it's not impossible, see this community article).

Note: any switches you specified in the 'Modify command line' text field are appended to what you see in 'Show package info'