Configuring RunVirtual Registry from the AppxManifest.xml

Related Posts
9 Comments
Gary Coyle

Hi..great article…

 

I came across this issue a few weeks ago and realised that every time I saved the manifest file it changed the VersionID.

How do you modify the manifest file to add multiple EXE files..?

 

For Example i have sequenced Adobe Acrobat and want to add the Run Virtual keys for all the addins  (WinWord,Excel,Powerpoint,Outlook)

Hi Gary. Thanks! If I’m understanding correctly, you may want to look at this post? http://www.alkanesolutions.co.uk/2016/05/25/using-runvirtual-present-excel-addins/

Gary Coyle

All i am looking for is the command to add multiple EXE’s under the runvirtual key..

 

So is it just a comma after each EXE…

RunVirtual -Name Excel.exe,Winword.exe,Outlook.exe

In using CMD /C and the 2 x config files we add multiple EXE’s as below…

 

REG ADD HKLM\Software\Microsoft\AppV\Client\RunVirtual\WINWORD.EXE /ve /d b8c914a5-7183-4b08-99a9-0b9b8e92da3f_90daefa1-8cf9-4d7f-8a4a-49fb80c4074e /f | REG ADD HKLM\Software\Microsoft\AppV\Client\RunVirtual\EXCEL.EXE /ve /d b8c914a5-7183-4b08-99a9-0b9b8e92da3f_90daefa1-8cf9-4d7f-8a4a-49fb80c4074e /f | REG ADD HKLM\Software\Microsoft\AppV\Client\RunVirtual\POWERPNT.EXE /ve /d b8c914a5-7183-4b08-99a9-0b9b8e92da3f_90daefa1-8cf9-4d7f-8a4a-49fb80c4074e /f | REG ADD HKLM\Software\Microsoft\AppV\Client\RunVirtual\OUTLOOK.EXE /ve /d b8c914a5-7183-4b08-99a9-0b9b8e92da3f_90daefa1-8cf9-4d7f-8a4a-49fb80c4074e /f

 

Ahh I see.  In that case maybe try this:

Get-AppvClientPackage -all | where {$_.Name -eq 'Alkane_Package'} | foreach { foreach ($processname in @('excel.exe','winword.exe','powerpnt.exe','outlook.exe')) { New-Item -Path HKCU:\SOFTWARE\Microsoft\AppV\Client\RunVirtual -Name $processname -Value ($_.PackageId.toString() + '_' + $_.VersionId.toString()) -Force }}

Let me know if this works or not as I don’t have time to test it.  Be careful how you manage your RunVirtual entries though.  As previously linked to in these comments, I’d be tempted to create a ‘blank’ package for each process to be honest.

vandana

Hi ,

I Have created a package for excel add ins now i want to add a key in RunVirtual folder in registry after updating UserScript.xml

<UserScripts>
<PublishPackage>
<Path>cmd.exe</Path>
<Arguments>/C REG ADD HKLM\SOFTWARE\Microsoft\AppV\Client\RunVirtual\Excel.exe /t REG_SZ /d “0caeee91-79fa-4f7a-a3df-7a0a62b455ac_7982df1a-9b0a-40f8-ab9a-23d6950f8662″ /f</Arguments>
<Wait RollbackOnError=”true” Timeout=”30″/>
</PublishPackage>
<UnpublishPackage>
<Path>cmd.exe</Path>
<Arguments>/C REG DELETE HKCU\SOFTWARE\Microsoft\AppV\Client\RunVirtual\Excel.exe /f</Arguments>
<Wait RollbackOnError=”false” Timeout=”30″/>
</UnpublishPackage>
</UserScripts>

But registry key is not added. please help me to solve this problem.

 

Hi. I suspect it’s a permissions issue since you’re trying to add a HKLM registry entry from a User script…

vandana

i am using above script in appvmainfest.xml but still not adding registry key dynamically. please help me.

<appv:UserScripts>
<appv:PublishPackage>
<appv:Path>powershell.exe</appv:Path>
<appv:Arguments>-ExecutionPolicy ByPass -command “Get-AppvClientPackage -all | where {$_.Name -eq ‘AddInExcel’} | foreach { New-Item -Path HKCU:\SOFTWARE\Microsoft\AppV\Client\RunVirtual -Name Excel.exe -Value ($_.PackageId.toString() + ‘_’ + $_.VersionId.toString()) -Force }”</appv:Arguments>
<appv:Wait RollbackOnError=”false” />
</appv:PublishPackage>
<appv:UnpublishPackage>
<appv:Path>powershell.exe</appv:Path>
<appv:Arguments>-ExecutionPolicy ByPass -command “Remove-Item -Path HKCU:\SOFTWARE\Microsoft\AppV\Client\RunVirtual\Excel.exe -Recurse -Force”</appv:Arguments>
<appv:Wait RollbackOnError=”false” />
</appv:UnpublishPackage>
</appv:UserScripts>

A few thoughts off the top of my head…..check that your package name is ‘AddInExcel’ as per your script, check that you are not publishing in a global context, check for any dodgy quotes (As a result of copying and pasting – these two characters are different ““).

vandana

Thanks Kae, yes package name is AddInExcel. I am not getting how do i check this package publishing in Global context.

Leave a Reply
Send us a message

Send your message any time you want.

Our usual reply time: 2 Business Hours
Send us a message

Have a question? Send us a message.

Our usual reply time: 2 Business Hours