I ran the Set-ActiveSetup command you shared above and the my log file showed me this error:
[Pre-Installation] :: Failed to set Active Setup registry entry.
Error Record:
-------------
Message : Exception calling "GetExtension" with "1" argument(s): "Illegal characters in path."
InnerException : System.ArgumentException: Illegal characters in path.
at System.IO.Path.GetExtension(String path)
at CallSite.Target(Closure , CallSite , RuntimeType , Object )
FullyQualifiedErrorId : ArgumentException
ScriptStackTrace : at Set-ActiveSetup<Process>,
D:\Development\psappdeploytoolkit\Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1: line 7987
at <ScriptBlock>, D:\Development\psappdeploytoolkit\Testing\Deploy-Application.ps1: line 111
at <ScriptBlock>, <No file>: line 1
PositionMessage : At D:\Development\psappdeploytoolkit\Toolkit\AppDeployToolkit\AppDeployToolkitMain.ps1:7987 char:4
+ [string]$StubExeExt = [System.IO.Path]::GetExtension($StubExePath)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error Inner Exception(s):
-------------------------
Message : Illegal characters in path.
InnerException :
Looking at your command again, you have the wrong path for -StubExePath. That parameter should only have the path of the file you wish to execute. Then use the -Arguments parameter to pass the -StubExePath any other options. Therefore, your command should look like this:Set-ActiveSetup -StubExePath "$envWinDir\regedit.exe" -Arguments "/S `"%SystemDrive%\Program Files (x86)\DataLink Viewer 11\DesChampsLive_DataLink_Viewer.reg`"" -Description 'VA Database ODBC Setup' -Key 'DataLinkViewer_ODBC_UserSetup' -ContinueOnError $true