Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,

I have a program which is in winform, I want that, that program will install automatically without clicking on that file (just placed that exe file in pen drive, where that pen drive connected to the computer that exe file run there)


In simple sense install a program silently


Plz provide snippet if possible


Thanks in advance very much
Posted
Comments
Sergey Alexandrovich Kryukov 9-Apr-14 15:36pm    
First of all, think at this: do you need installation at all? What should it do, except copying some executable somewhere?
—SA
joshrduncan2012 9-Apr-14 16:48pm    
I agree with SA. This sounds just like copying a file to a new location.
Sergey Alexandrovich Kryukov 10-Apr-14 11:42am    
The OP purpose was different. Please see discussion below and my answer.
—SA
binadi007 10-Apr-14 7:56am    
@SA thing is, is it possible to make an exe, which is itself run without clicking on it
Sergey Alexandrovich Kryukov 10-Apr-14 8:46am    
"Clicking" is not how applications are run. :-)
You still did not answer my question.
—SA

1 solution

binadi007 wrote:
Simply I just want to install a program without any click on installation file. For example when I put exe file to my pen drive or hard disk, it automatically install into the computer.
There are no situations where it could be considered as a legitimate action. You are going to do something without a user's consent. If I was a user, I 1) would consider it as a crime against me, even if it was an official company policy or something like that, 2) I would take some measures to not allow that happen anyway. Even though it is technically possible and even pretty simple, I don't think we should help to implement non-legitimate or questionable action.

So, what to do instead? Usually, such products have so called "portable version"; and, in some cases, this is the only version. In present-day jargon, it simply means that the user executes your application directly from your thumb drive. The user can also copy the product to any directory of the user's choice; and the application should be able to run without hassles. In fact, this is the best way to package software products, especially if they are simple enough. And, optionally, an "installable version" could be provided. But it makes sense only if installation gives the user some additional benefits over the "portable version". For example, installable version can setup integration with some already installed products (which is, by definition, cannot be portable), collect some user preferences during installation, and, most importantly, provide a correct uninstallation. If you don't provide such benefits, "installable version" makes no sense.

Now, a word about silent installations. They are usually used to automate installation on many computers and make little to no sense otherwise. In this case, all installation preferences are presented in a pre-created data set which complements the "manual" installation. The purpose of it it to perform considerable volume of work in batch mode, to avoid boring, non-productive, and repeated manual work. Not for doing anything in a subliminal manner, as a diversion against the user. :-)

—SA
 
Share this answer
 
v4
Comments
joshrduncan2012 10-Apr-14 11:49am    
Perfection! My +5.
Sergey Alexandrovich Kryukov 10-Apr-14 12:12pm    
Thank you very much.

(Actually, this is enormously exaggerated praise ("perfection"? come one!), but it has its bright side: it puts some obligations on me. After seeing your comment, I immediately spotted and fixed 4 cased of type and fixed them; I suspect there are more :-.)

—SA
Sanket Saxena 10-Apr-14 11:53am    
+5
Sergey Alexandrovich Kryukov 10-Apr-14 12:12pm    
Thank you, Sanket.
—SA
Sanket Saxena 10-Apr-14 12:22pm    
Most Welcome SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900