Open jk-85 opened 5 days ago
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process See info in area-owners.md if you want to be subscribed.
This is a limitation of cmd.exe/explorer.exe
, not .NET. A better approach is using rundll32
with url.dll
, which correctly handles URLs with query strings:
System.Diagnostics.Process.Start("rundll32",
"url.dll,FileProtocolHandler https://www.dextools.io/app/en/solana/pair-explorer/FqfttpudzsmLbnx6jR5FBpqJCJxQuvT8tAS2ma68HHQe?t=1724604221437");
This opens the browser with the full URL. See this discussion.
Thanks for the reply!
Description
I tested it up to .Net 8 and with Win7 and Win10:
System.Diagnostics.Process.Start("explorer.exe", "https://www.dextools.io/app/en/solana/pair-explorer/FqfttpudzsmLbnx6jR5FBpqJCJxQuvT8tAS2ma68HHQe?t=1724604221437");
This should open the default web-browser and it does work fine with all other urls, but when I use this url, the standard explorer.exe will be opened and no webbrowser starts. When I delete the part "?t=1724604221437" the web-browser will start as expected and appends a "?t=xxxxxxxx" number on it's own.
Maybe it's more related to explorer.exe instead of the Process-class.
Reproduction Steps
See above
Expected behavior
See above
Actual behavior
See above
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response