How to pass exe parameter downloaded from internet?

I have a .Net desktop application that users can download from my site. I want to configure this application for each user. Is there a way to modify exe before loading, just to change a few lines suitable for users to download? Or can I pass command line parameters to this exe via a URL?

+5
source share
4 answers

The .exe file must be configured so that it behaves differently for certain downloads.

Skip below to find a solution that I found acceptable.

Add Partition to .EXE File - Not Ideal.

.exe . , . ( ) , - . .exe -, , .

.EXE - .

. . , .

.EXE - .

, .exe . .

.EXE - Passable.

. , - , .


☑ .EXE .EXE - .

, . , .

() . , -exe, exe, , , , , .

: , -, - .

:
1. , - .exe PHP
2. (, Ninite) >

+1
0

ClickOnce , URL ClickOnce. .


, , . , , SettingsNeedUpdate, true .

:
"Option1", "Option2" "SettingsNeedUpdate", . Main - :

...
try
{
    if (Properties.Settings.Default.SettingsNeedUpdate)
    {
        Properties.Settings.Default.Option1 = ...;
        Properties.Settings.Default.Option2 = ...;
        Properties.Settings.Default.SettingsNeedUpdate = false;
        Properties.Settings.Default.Save();
    }
}
catch (Exception exp)
{
    ...
}

...
0

You can write a library that can modify assembly resources (here is a table row). This library can benefit from reflection.

When a user requests your file, the asp.net page can configure exe (using your library) and send it to the client.

0
source

All Articles