Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#113 - Allow Launcher.exe to pass through the ActivationData arguments #135

Closed

Conversation

e-master
Copy link

@e-master e-master commented Sep 1, 2021

Allow Launcher.exe pass through the ApplicationData arguments to the clickonce application as process scoped environment variables (CLICKONCE_ACTIVATIONDATA_1, CLICKONCE_ACTIVATIONDATA_2, etc.). This is important in order to get the command line arguments and other information into the clickonce-packaged application runtime. This change directly addresses the issue #113.

This change is backwards compatible, doesn't require any API changes. It does require some effort from the application developers to actually read and parse the environment variables for CLICKONCE_ACTIVATIONDATA_x variables, but i wanted to make the change as least invasive as possible.

I couldn't find any existing tests for Launcher.exe, but i did test the change locally and it worked fine.

In the following example the name of the file (using file associations in ClickOnce) is passed through by Launcher.exe as a process scoped environment variable:
image

…o the clickonce application as process scoped environment variables (CLICKONCE_ACTIVATIONDATA_1, CLICKONCE_ACTIVATIONDATA_2, etc.). This is important in order to get the command line arguments and other information into the clickonce-packaged application runtime. This change directly addresses the issue #113.
@dnfadmin
Copy link

dnfadmin commented Sep 1, 2021

CLA assistant check
All CLA requirements met.

@NikolaMilosavljevic
Copy link
Member

@e-master thank you for the PR. We plan a solution for fixing issue #53 that will supplant this proposal.

@e-master
Copy link
Author

e-master commented Nov 4, 2021

thanks @NikolaMilosavljevic. Would you be able to provide any timelines for the solution, so that i (and other developers) can plan accordingly? Would it be at all possible to have this fixed before .NET 7? Don't want to repeat all the complaints here, but this is indeed the very last blocker that prevents us to upgrade to .NET 5/6.

@ctkemper
Copy link

ctkemper commented Nov 5, 2021

@NikolaMilosavljevic Can you please tell us if this will be available in the upcoming .NET6 release? Our dev team is spending lots of time on various workarounds for deploying via ClickOnce without the ApplicationDeployment class, as described in #27, #53, etc. Maybe we don't need to? Some guidance would be much appreciated.

@NikolaMilosavljevic
Copy link
Member

@e-master @ctkemper we are not yet sure when this will be released, but we are not tied to .NET 7 release dates.

@simmotech
Copy link

Confused. Is this in the .NET 6 release or not?

@e-master e-master deleted the issue113-activation-data-passthrough branch November 13, 2021 18:47
@e-master
Copy link
Author

The fix to this issue is not in the .net 6 release, and there's no clear timeline for it either. I think i'll have to try a suggestion here: #53 (comment) because I can't afford to wait any longer for the fix.

@simmotech
Copy link

Thanks @e-master.
This was a good, simple fix to a big problem. Pity it wasn't incorporated for the .net 6 release.

@nzain
Copy link

nzain commented Feb 1, 2022

@NikolaMilosavljevic can you clarify why this was closed? We are waiting for argument forwarding. Should we open another issue for net6?

@cklutz
Copy link

cklutz commented Nov 16, 2022

Apparently, it has been incorporated (in a slightly different, IMHO better, way) #208.

@nzain
Copy link

nzain commented Nov 22, 2022

@cklutz Thats not true for ClickOnce windows applications and file associations. Issue #113 is open and dormant. As far as I understand this PR was closed due to collision with work related to URL parameters #53 ... which, in turn, should prepare for a solution of #113.

@cklutz
Copy link

cklutz commented Nov 22, 2022

@nzain Well, I most likely misunderstood you then. But I'm using what is proposed in #208 in my application right now. Specifically the ClickOnce_IsNetworkDeployed environment variable that the launcher sets and my application can then read.

#208 is a slightly different solution to the same problem than this PR, but I think it is even better. It uses specifically named env vars instead of "_1", etc. and also exposes more information to the application. YMMV of course.

I'm using Microsoft.DotNet.Mage 7.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants