iSteffen
Posts: 6
Joined: Thu Apr 07, 2022 10:00 pm

MSI installer does not run my CMD file via GPO

Thu Apr 07, 2022 10:04 pm

Hello Forum,

I have built a CMD file that I run briefly as a temp file during installation. When I install my MSI package via GUI the call works.

But when I roll it out via GPO it does not. I think this is because the desktop is not completely loaded at startup. Is there anything I can do to adjust this? That he waits for the finished booted system?

Thanks already!
iSteffen

Catalin
Posts: 6537
Joined: Wed Jun 13, 2018 7:49 am

Re: MSI installer does not run my CMD file via GPO

Fri Apr 08, 2022 9:57 am

Hello iSteffen,

Unfortunately, I can not say for sure why this is happening.

If it is indeed what you mentioned, then perhaps you can add some delay in your BAT file?

For instance, you could use the timeout command.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

iSteffen
Posts: 6
Joined: Thu Apr 07, 2022 10:00 pm

Re: MSI installer does not run my CMD file via GPO

Fri Apr 08, 2022 1:20 pm

Here is the solution for all:

I solved it via a "Custom Actions" -> "PowerShellScriptInline".

Here is my PowerShell code:
$root = 'URL'
$user = "USERNAME"
$pass= "PASSWORD"
$secpasswd = ConvertTo-SecureString $pass -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($user, $secpasswd)

$result = Invoke-RestMethod $root -Credential $credential

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: MSI installer does not run my CMD file via GPO

Fri Apr 08, 2022 2:49 pm

Hi, iSteffen!

I'm glad you solved the problem. Thank you for your follow-up on this and for sharing your solution with us!

I am sure this will be of help for other users facing a similar scenario.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”