Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

PENDING Deploy a reg file for an application immediately after the application is deployed

  • Thread starter Thread starter micdam
  • Start date Start date
  • Replies Replies 3
  • Views Views 2K

micdam

Well-Known Member
Messages
99
Reaction score
1
Points
8
Hi, i create an application to deploy System Center Service Manager 2016 with all dependencies and supersedences but i want to deploy a reg file immediately after the setup is finished that contains the information about the server name.
is it possible to deploy it in the same application? it is to say somethig like "dependency tab" (here i deploy the preq) but after install because the server name is in a registry created during installation?


Dependency Tab
1538129328603.png


Supersedence
1538129394124.png



The application to set the server name is a powershell scrit like this:

ServiceManagerLogin.ps1

$regkey_property_name = 'SDKServiceMachine'

$regkey = get-item -Path Registry::'HKEY_CURRENT_USER\Software\Microsoft\System Center\2010\Service Manager\Console\User Settings'


$value = $regkey.GetValue($regkey_property_name)
#$valueType = $regkey.GetValueKind($regkey_property_name)

if ($value -ne 'xxx - SERVERNAME XXX'){

Set-ItemProperty -Path Registry::'HKEY_CURRENT_USER\Software\Microsoft\System Center\2010\Service Manager\Console\User Settings' -Name SDKServiceMachine -Type "STRING" -Value "xxx - SERVERNAME XXXr"
}




and i try to do all af those thinks in a whole application , without using task sequence
 

Attachments

  • 1538129850779.png
    1538129850779.png
    38.2 KB · Views: 0
Why don't you edit the MSI to have it add these keys are part of the install? Or Wrap the whole setup in a batch file?

BTW, there is no product call SCCM 2016, it is called SCCM Current Branch (CMCB).
 
Sorry my bad about SCSM, I read things too quickly.

So it it clear about editing the MSI or wrapping the setup in a batch file?
 
Back
Top