Jump to content


Recommended Posts

Hi,

If you want the application to be configured for each new user that logs onto the machine and you only want it to occur once per user than Microsoft have something built for this already.

It's called activesetup.

You just add a few registry keys to HKLM. User logs on and it runs whatever is in the stubpath

info

Example

If you run the below code in the ISE as administrator, then log off and back on again IE will load just one time per new user :)

For each new activesetup make sure you make it unique with a new GUID

#requires -Version 1

<#
Author: Richard Knight
Version:1.0

Purpose: Creates Active Setup keys
random GUID created at https://www.guidgenerator.com/
#>

$Appname = 'Name of Application'
$stubpath = 'C:\Program Files (x86)\Internet Explorer\iexplore.exe'

$Reglocation = 'HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{f4d8fb9e-3bce-4152-add4-2f4e5f647610}'
New-Item -Path $Reglocation -Force
New-ItemProperty $Reglocation -Name 'Product' -Value "$Appname"
New-ItemProperty $Reglocation -Name 'StubPath' -Value "$stubpath"
New-ItemProperty $Reglocation -Name 'Version' -Value '1'

 

Share this post


Link to post
Share on other sites

Here is the .reg if it makes it easier.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{f4d8fb9e-3bce-4152-add4-2f4e5f647610}]
"Product"="Name of Application"
"StubPath"="C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe"
"Version"="1"

 

Share this post


Link to post
Share on other sites

1 hour ago, dinci5 said:

Ho do you deploy the application?

Did you wrap it in a script? VBS, bat, PS?

If so, you can easily append that command in the script.

Hi dinci5,
Sorry i wasn't clear, I'm deploying the Application via SCCM Application option.

Thanks!
 

Share this post


Link to post
Share on other sites

2 hours ago, Ath3na said:

Here is the .reg if it makes it easier.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{f4d8fb9e-3bce-4152-add4-2f4e5f647610}]
"Product"="Name of Application"
"StubPath"="C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe"
"Version"="1"

 

 

2 hours ago, Ath3na said:

Hi,

If you want the application to be configured for each new user that logs onto the machine and you only want it to occur once per user than Microsoft have something built for this already.

It's called activesetup.

You just add a few registry keys to HKLM. User logs on and it runs whatever is in the stubpath

info

Example

If you run the below code in the ISE as administrator, then log off and back on again IE will load just one time per new user :)

For each new activesetup make sure you make it unique with a new GUID


#requires -Version 1

<#
Author: Richard Knight
Version:1.0

Purpose: Creates Active Setup keys
random GUID created at https://www.guidgenerator.com/
#>

$Appname = 'Name of Application'
$stubpath = 'C:\Program Files (x86)\Internet Explorer\iexplore.exe'

$Reglocation = 'HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{f4d8fb9e-3bce-4152-add4-2f4e5f647610}'
New-Item -Path $Reglocation -Force
New-ItemProperty $Reglocation -Name 'Product' -Value "$Appname"
New-ItemProperty $Reglocation -Name 'StubPath' -Value "$stubpath"
New-ItemProperty $Reglocation -Name 'Version' -Value '1'

 

Thanks!

My question is how do i add such script so it will run after SCCM has successfully installed the Application to a given machine.

Thanks again.

Share this post


Link to post
Share on other sites

As someone else already mentioned, if you're running a script to perform the installation, just append it to the end of your script.

If you were deploying it as an SCCM Package (instead of an Application), then you could create two packages.  Have Package A install OneNote. Have Package B run your command.  Then use the Run another program first option on Package B, tell it that it has to install Package A, then deploy Package B. 

I'm sure there's an equivalent to that with Applications, but in all honesty I still do far more with packages than applications.  

Share this post


Link to post
Share on other sites

14 hours ago, BryanP said:

As someone else already mentioned, if you're running a script to perform the installation, just append it to the end of your script.

If you were deploying it as an SCCM Package (instead of an Application), then you could create two packages.  Have Package A install OneNote. Have Package B run your command.  Then use the Run another program first option on Package B, tell it that it has to install Package A, then deploy Package B. 

I'm sure there's an equivalent to that with Applications, but in all honesty I still do far more with packages than applications.  

Thank you!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.