Hello!

I am trying to deploy Pandoc through powershell(Appdeploy toolkit) to Software Center.
I have been looking in this discussion on the post from 2016 and been googling to try find the correct answer.

Ive beent trying with a basic command line as "Execute-MSI -Action Install -Path "pandoc-3.1.8-windows-x86_64.msi" -Parameters "/qn /norestart" "
Which does not install it for all users but instead the current user.

I have also tried to do the following which again only installs for the current user.

"# Define the paths
$sourceInstaller = "$env:files\pandoc-3.1.8-windows-x86_64.msi"
$destinationFolder = "C:\Temp"
$installLogFile = "C:\Temp\Pandoc_Install.log"

# Copy the installer to the destination folder
Copy-Item -Path $sourceInstaller -Destination $destinationFolder -Force

# Install Pandoc silently for all users
$installArguments = "/qn ALLUSERS=1"
$installCommand = "msiexec.exe /i ""$destinationFolder\pandoc-3.1.8-windows-x86_64.msi"" $installArguments /log ""$installLogFile"""

# Execute the installation
Start-Process -FilePath "powershell.exe" -ArgumentList "-NoProfile -ExecutionPolicy Bypass -Command $installCommand" -Wait

# Check for the installation success
if (Test-Path "HKLM:\SOFTWARE\Pandoc") {
    Write-Host "Pandoc has been successfully installed."
} else {
    Write-Host "Pandoc installation failed."
}

# Remove the installer file
Remove-Item -Path "$destinationFolder\pandoc-3.1.8-windows-x86_64.msi" -Force"

Do you guys have any tips or would like to share the code you are using to make it work?

Best Regards

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/2e3babae-b377-483e-b9b8-d322ac4a08f3n%40googlegroups.com.