.\DesktopAppConverter.ps1 -ExpandedBaseImage C:\ProgramData\Microsoft\Windows\Images\BaseImage-14316
–Installer C:\Users\chris\Downloads\x\x.exe -InstallerArguments "/S" -Destination C:\Output\x
-PackageName "VLC" -Publisher "CN=Company,name" -Version 0.2.2.2 -MakeAppx -Verbose
So the comodo certificate i am having for my app has a comma in the CN , i.e. ,something like CN="Comapany, NAme"
How can i pass this in powershell
According to Microsoft documentation about appxmanifest you can include comma in publisher name without a problem as long as the publisher name is surrounded by quotes ("):
https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx
So the real question is how to pass publisher name with quotes to AppConverter.
The solution seem to be to represent " with \"\" when passing publisher like this:
-Publisher 'CN=\"\"Company, Name\"\"'
The full command here:
DesktopAppConverter.exe -Installer myInstaller.exe -InstallerArguments "/S" -Destination . -PackageName "MyApp" -Publisher 'CN=\"\"Company, Name\"\"' -Version 0.0.0.1 -MakeAppx
However there seems to be a bug in DesktopAppConverter. The result I get is this:
CN="Company, Name
The 2nd " is missing from the result. I'm not sure why DesktopAppConverter is unable to recognize the 2nd \"\" special character, but that's the case and so we're unfortunately stuck here.
Update: Found the solution. With trial and error I found out that adding double quote "" helps in recognizing the 2nd quote. So the following works:
-Publisher 'CN=\"\"Company, Name""\"\"'