Issue with Set-Active setup and stubpath

Hi guys,

Trying to use exe files that already exist in the OS on Win7 x64 such as regedit, msiexec and I get this error

[Installation] :: Failed to set Active Setup registry entry. 
Error Record:

Message        : Active Setup StubPath file [regedit.exe] is missing.
InnerException : 

FullyQualifiedErrorId : Active Setup StubPath file [regedit.exe] is missing.
ScriptStackTrace      : at Set-ActiveSetup<Process>, C:\Windows\ccmcache\1\AppDeployToolkit\AppDeployToolkitMain.ps1: line 8080
                        at <ScriptBlock>, C:\Windows\ccmcache\1\Deploy-Application.ps1: line 130

PositionMessage : At C:\Windows\ccmcache\1\AppDeployToolkit\AppDeployToolkitMain.ps1:8080 char:62
                  +             If (-not (Test-Path -Path $StubExePath -PathType Leaf)) { Throw "Active Setup ...
                  +                                                                       ~~~~~~~~~~~~~~~~~~~

stubexe I use is $envWindir\system32\msiexec.exe or $envWindir\regedit.exe

Any ideas?

Installations take place with system account

And seems the system account is unable to find the path. When I run it in logged on user’s context it works. Weird…

Can you share your full command for executing this function?

Hi Muhammad,

This is the command I use
Set-ActiveSetup -StubExePath 'msiexec.exe' -Arguments '/fup {5BD2C189-272A-458F-8075-685BA4500A3F} /passive /norestart /l*v C:\WINDOWS\Logs\MSI\PwC_Tickmarks_ActiveSetup_1.3.log' -Description 'PwC Tickmarks User Config' -Key 'PwC_Tickmarks_1.3_config'

I have also used this

`Set-ActiveSetup -StubExePath ‘$envWindir\system32\msiexec.exe’ -Arguments ‘/fup {5BD2C189-272A-458F-8075-685BA4500A3F} /passive /norestart /l*v C:\WINDOWS\Logs\MSI\PwC_Tickmarks_ActiveSetup_1.3.log’ -Description ‘PwC Tickmarks User Config’ -Key ‘PwC_Tickmarks_1.3_config’’

It seems that today it doesn’t work with either my account or the system one. Perhaps it needs the msiexec file in the Files directory?

This command, -StubExePath ‘msiexec.exe’, does not work because you do not give the full path to msiexec.exe.

This command, -StubExePath ‘$envWindir\system32\msiexec.exe’, does not work because you are using single quotation marks instead of double quotation marks. Single quotation marks mean that you want PowerShell to interpret the text exactly as it is written. Double quotation marks means that you want PowerShell to expand variables to their actual values. Therefore, the command should be: -StubExePath “$envWindir\system32\msiexec.exe”

Hi Muhammad,

That would make sense. I have to admit i’m still novice in powershell. It is nice to learn something new every day :slight_smile:

Thank you.