.Net Framework Installation
-
Hi I have few doubts, as I am going to release my app: 1. My application developed in C# VS2005 needs .Net Framework to be installed in PC.So, if the user runs the app, is there any way to detect for framework , prompt and start downloading .Net Framework from Microsoft? As it is very frustrating for user to go to website , search and download. 2.I need to change the host file in PC , ex:192.168.51.150 something.com. Can it be done programmatically?? Immediate reply is appreciated.Thanks in advance Aruna
-
Hi I have few doubts, as I am going to release my app: 1. My application developed in C# VS2005 needs .Net Framework to be installed in PC.So, if the user runs the app, is there any way to detect for framework , prompt and start downloading .Net Framework from Microsoft? As it is very frustrating for user to go to website , search and download. 2.I need to change the host file in PC , ex:192.168.51.150 something.com. Can it be done programmatically?? Immediate reply is appreciated.Thanks in advance Aruna
1 - If a PC does not have .NET, I believe it will just crash, you need to provide an installer that also installs it. 2 - If you have permission, you can write to any file on the PC. Which means, if it's Vista, you won't have permission :-)
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
Hi I have few doubts, as I am going to release my app: 1. My application developed in C# VS2005 needs .Net Framework to be installed in PC.So, if the user runs the app, is there any way to detect for framework , prompt and start downloading .Net Framework from Microsoft? As it is very frustrating for user to go to website , search and download. 2.I need to change the host file in PC , ex:192.168.51.150 something.com. Can it be done programmatically?? Immediate reply is appreciated.Thanks in advance Aruna
In Visual Studio, right-click your solution and select Add New Project. For the project type, find the Setup Project (it should be under Other Project Types-> Setup and Deployment) One of the things you can do in such a project is specify prerequisites. One such prerequisite will be the .NET framework. You can tell it to download the prerequisite from the vendor's website - in this case, it will automatically know where to download the .NET framework from. If this isn't enough detail, there are several very good articles on this website describing how to do this in extreme detail. ***** For the hosts file, you may want to consider not making that edit. While (on XP) nothing stops you from doing so, it is considered by some antivirus and anti-malware programs to be virus or malware-like behavior and it will be immediately stripped out. Unless you can guarantee that the end user's system won't do that, you shouldn't rely on it. Unless there's some convincing reason you actually MUST use a hostname, it might just work better for you to use the IP address. But yes, this can be done programatically. The hosts file is just a file on the computer like any other and edits to it take effect immediately. It is located at %SYSTEM%\drivers\etc\hosts, and the best thing to do is probably just append a line at the end so as not to alter any existing custom hosts (for example, I put some in there sometimes when websites I'm working on haven't resolved through DNS yet).
-
In Visual Studio, right-click your solution and select Add New Project. For the project type, find the Setup Project (it should be under Other Project Types-> Setup and Deployment) One of the things you can do in such a project is specify prerequisites. One such prerequisite will be the .NET framework. You can tell it to download the prerequisite from the vendor's website - in this case, it will automatically know where to download the .NET framework from. If this isn't enough detail, there are several very good articles on this website describing how to do this in extreme detail. ***** For the hosts file, you may want to consider not making that edit. While (on XP) nothing stops you from doing so, it is considered by some antivirus and anti-malware programs to be virus or malware-like behavior and it will be immediately stripped out. Unless you can guarantee that the end user's system won't do that, you shouldn't rely on it. Unless there's some convincing reason you actually MUST use a hostname, it might just work better for you to use the IP address. But yes, this can be done programatically. The hosts file is just a file on the computer like any other and edits to it take effect immediately. It is located at %SYSTEM%\drivers\etc\hosts, and the best thing to do is probably just append a line at the end so as not to alter any existing custom hosts (for example, I put some in there sometimes when websites I'm working on haven't resolved through DNS yet).
Thanks for your detailed reply.Its working fine. But I have one more doubt regarding memory usage.When I run the application the memory is 170 000K, when I minimise the app, it drops drastically. Is it ok?I heard the task manager does not show accurate memory usage. Do I need to take any action? Or in the start of the program, do I programmatically minimise the form and maximise again? Please clarify my doubts. Thanks