The real answer is no, you should not do this. ClickOnce applications are installed under the user profile and belong only to that user. This will not and will not work as a custom installation.
Also note that if you double-click the [exe] file (the location of which changes with each update), it will not look for updates, it will not check the files to make sure t have been tampered with. In other words, it will not work as a ClickOnce application.
I also think that passing the username and password in the query string is not recommended, because anyone who runs the script or charles or any other network traffic sniffer will be able to see the credentials.
RobinDotNet
source share