I am trying to launch a legacy win32 software that takes command line arguments from my UWP app.
The win32 app (xxx) does not inherently support activation protocols and URI but I was able to add this by using registry entries at:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTxxx]
@="URL:xxx"
"URL Protocol"=""
[HKEY_CLASSES_ROOTxxxshell]
[HKEY_CLASSES_ROOTxxxshellopen]
@=""
[HKEY_CLASSES_ROOTxxxshellopencommand]
@=""C:\Program Files (x86)\xxx\xxx.exe" "%1""
I have implemented the following in my UWP app but it only launches the app and does not pass the arguments:
await Launcher.LaunchUriAsync(new Uri("xxx:aaa=123"));
How do I go about passing command line arguments to a Win32 app from UWP?
I don't mind creating a Win32 app or a console app to be the middle man here to read the activation protocol and convert it to a command line argument and run the win32 but could not find any solutions to doing so.
Thanks.
question from:
https://stackoverflow.com/questions/65912523/how-do-you-implement-launching-a-win32-exe-with-command-line-arguments-from-an-u 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…