Feature request and bug

Hi guys

There is an bug in the Execute-Process function, it can’t handle spaces in the -Path parameter.

Also I have a feature request to Remove-MSIApplications function. We have a bunch of software that have the same name in “Programs and Features/AppWiz.cpl” but with diffrent version numbers. The function dosen’t support to specify version numbers which is very much needed.

Thanks

Please post bug and feature requests to GitHub with a separate item for each request:

Also, you can use -ExcludeFromUninstall parameter of Remove-MSIApplications to specify version numbers you don’t want to remove and thus accomplish what you want.

For the bug report, what version of the toolkit are you using? What is the exact command you executed? What was the error you received?

Hi Muhammad

Thanks for the link, i will use that in the future. We are running v.3.6.3 and it dosen’t seem to include a -ExcludeFromUninstall parameter, and i just noticed that v.3.6.5 has the functionality.
I will post the bug at GitHub.

I added the requested feature using parameter -FilterApplication to the latest 3.6.6 beta found here if you wish to test:

Thanks Muhammad. I’ll wait for the final build because i have done a lot of customization to the mainscript which takes quite some time to implement.
I have implemented a “Install on Boot” button to the Show-InstallationWelcome function so that users can choose to install the program on Active Setup. From there i have made a custom script that calls the advertisement on boot during Active Setup - it was a requestet feature from the users, and by doing it this way we can follow the installations in the SCCM reporting.

To avoid having to merge your changes with our changes each time we release a new version of the toolkit, you can create a new version of one of our functions, add a 2 to the end of the function name, and put this modified function into the AppDeployToolkitExtensions.ps1.

The toolkit extensions file is designed so that you can put your extensions in there and avoid modifying the main toolkit.

Okay, i have done a lot of changes to different functions in order to make this work, including new variables to the XML file, so i believe its easier to just merge.
I’m looking forward to the new version, and thanks a bunch for your work - it’s very appreciated!

There is an bug in the Execute-Process function, it can’t handle spaces in the -Path parameter.

Was this ever addressed? I am currently battling with it trying to register a activex control (.ocx).

Current syntax…

Execute-Process “c:\Windows\System32\regsvr32.exe” -parameters “%ProgramFiles(x86)%\Company Name\Video Gateway\WebViewer.ocx’”

%env_vars% don’t work like this in Powershell

Try this (Might not work):

<pre class=“brush: powershell; gutter: true; first-line: 1; highlight: []; html-script: false”>Execute-Process “c:\Windows\System32\regsvr32.exe” -parameters “$($env:ProgramFiles(x86))\Company Name\Video Gateway\WebViewer.ocx’”

Or This (better, uses PSADT’s variables):

<pre class=“brush: powershell; gutter: true; first-line: 1; highlight: []; html-script: false”>Execute-Process “c:\Windows\System32\regsvr32.exe” -parameters “$envProgramFilesX86\Company Name\Video Gateway\WebViewer.ocx’”

Let’s try that again…

%env_vars% don’t work like this in Powershell

Try this (Might not work):

Execute-Process “c:\Windows\System32\regsvr32.exe” -parameters “$($env:ProgramFiles(x86))\Company Name\Video Gateway\WebViewer.ocx”

Or This (better, uses PSADT’s variables):

Execute-Process “c:\Windows\System32\regsvr32.exe” -parameters “$envProgramFilesX86\Company Name\Video Gateway\WebViewer.ocx”