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

Active Setup

Started by David P, July 10, 2019, 11:59:02 AM

Previous topic - Next topic

David P

We just started using PatchMyPC here, and I have been recreating our SCCM applications in the product. Our old install script for WinSCP we use Active Setup to set keys in HKCU registry on logon to disable the self update message. Within PatchMyPC I am unable to select "Disable self-updater" for WinSCP. The option does show on "Martin Prikryl" but nothing happens when you select it. So I assume that the self updater cannot be disabled this way.
Has anyone handled Active Setup within PatchMyPC?
Besides adding a script that runs post installation, is it possible to also add a .reg file to the install location or some other location? It doesnt seem like the ability to just copy a file is in the interface, I suppose you could manually put the file in the application folder and redistribute, but I dont know if that would also work for Updates as well as Base installs. And doing something manually every build defeats the purpose.

I can think of other ways to do this:
1) run a post install script that adds the reg keys to HKLM\Software\Microsoft\Active Setup\Installed Components and then creates a .reg file with HKCU settings to import (might be the best option?)
2) add the reg keys in HKCU with GPO (simple but hard to target only computers with WinSCP installed)
3) add the reg keys in HKLM\Software\Microsoft\Active Setup\Installed Components with the post install script and point it to a reg file to be imported that is locally copied via GPO or Configuration Item (overly complicated)
I would love to have the entire install all in one place so option 1 might be the best bet and may be what people with this problem are doing?

Justin Chalfant (Patch My PC)

Quote from: David P on July 10, 2019, 11:59:02 AM
Has anyone handled Active Setup within PatchMyPC?

I'm not familiar with this product, you would need to use Batch, PowerShell, VBScript, EXE, or MSI for custom pre/post scripts.

If you are trying to target HKCU you may be better using the compliance settings feature in SCCM. Since updates run under SYSTEM, it would probably be hard to have HKCU targeted in a script directly.

David P

Active Setup is an undocumented unsupported feature of Windows. You add keys to HKLM\Software\Microsoft\Active Setup\Installed Components, one of the keys is a command to run the first time a user logs in, which is usually to merge a .reg file to put keys into the current user registry hive.
Compliance settings may not run in time, as the settings need to be in place before the application is opened by a new user, which could be before the compliance setting evaluates.
Regardless, I solved my problem, I used a post powershell script that creates a .reg file and adds the keys to HKLM to have it merge the .reg file on first time profile setup.
I had a minor setback because I was using the preview build and building applications, and the publishing service updated which reverted the tab back to packages and I didn't notice  :)

Justin Chalfant (Patch My PC)

Quote from: David P on July 10, 2019, 05:56:41 PM
I had a minor setback because I was using the preview build and building applications, and the publishing service updated which reverted the tab back to packages and I didn't notice  :)

Ah, this may have happened if you didn't click apply after enabling the preview build and just clicking update.

dandirk

We use this script to write to HKCU for all users and default profile for new logins...  As you said ActiveSetup is not supported, I would migrate away if possible (we have been for the last year) never know when it will get depreciated.

https://gallery.technet.microsoft.com/scriptcenter/Write-to-HKCU-from-the-3eac1692

With the new add custom files option you can easily add the script, reg files and run pre/post.

Hiroshisx

When will the issue be discussed in this regard?