Avoid application open after installation.

Hi everyone,

I am working with the PS APP Deployment toolkit. I am doing a powershell script in order to install silent application .exe.
The thing is that when the installation is completed the application opens. I dont want this.

The launch application checkbox is selected in the final dialog window and I dont know how to deselect this option.

I am using this line in the code :
##===============================================
##
INSTALLATION
##*===============================================
[string]$installPhase = ‘Installation’

if (Test-Path -Path “${env:ProgramFiles(x86)}\Arobas Music\Guitar Pro 7\GuitarPro7.exe”){
ExecuterLogiciel -Executable “${env:ProgramFiles(x86)}\Arobas Music\Guitar Pro 7\GuitarPro7.exe” -Arguments "
}

Does anyone has any idea to do this?

I appreciate it.

You will have to contact the vendor or the manufacturer of the setup file to learn how to modify the setup. Did you search for Silent Installation “GuitarPro7.exe”?

Yes I did, there is not information from the vendor but this line:

 

“C:\Program Files (x86)\Arobas Music\Guitar Pro 7\GuitarPro7.exe” --activate XXXXXXXX-XXXXXXXX-XXXXXXX

 

:frowning:

 

OK, but there is pretty much no chance at all for us to know what’s inside this setup file. Only the vendor/manufacturer can tell. If it is an MSI file inside a setup.exe you could try to extract the MSI and take look into the MSI properties with Orce or SuperOrca or some similar tool … but that is defenitely not a scripting issue.

Edit: The path you show actually indicates that the setup already run completely to the end.

Maybe you can make an MST transform file for the msi. If you’re lucky, there’s a property like NOLAUNCH you can set to 0 when running the msi.

If that’s a “public” property (the all caps name indicates this actually) you could even provide this on the command line without the need for an MST file. :wink:

Edit: Additional thought: If that command is not part of the actual installation anymore you will have to figure out what it is doing and mimic it in another way to avoid launching the app. It seems like it is only to activate the app AFTER the installation.

That’s what I meant. Or you can wait for the process and kill it:

while ( -not (get-process notepad -erroraction silentlycontinue) ) {
  start-sleep 1 }
stop-process -name notepad