Checking for .NET before running
-
Is there any way to check that .NET is installed before running? I'm looking to have my program put up an error message stating that .NET needs to be installed if hasn't been yet, kind of like how Windows programs used to tell you that you need to run the program in Windows if you try to start them up in DOS. To not know is bad. To not wish to know is worse.
-
Is there any way to check that .NET is installed before running? I'm looking to have my program put up an error message stating that .NET needs to be installed if hasn't been yet, kind of like how Windows programs used to tell you that you need to run the program in Windows if you try to start them up in DOS. To not know is bad. To not wish to know is worse.
Your going to need some kind of external process to check for the existence of the .NET Framework BEFORE your VB.NET app is launched. This is because the .NET Framework is needed just to load the VB.NET app. I haven't been able to find any method of replacing the stub code in a .NET executable to put up the kind of message you want. But, I could be wrong... RageInTheMachine9532
-
Your going to need some kind of external process to check for the existence of the .NET Framework BEFORE your VB.NET app is launched. This is because the .NET Framework is needed just to load the VB.NET app. I haven't been able to find any method of replacing the stub code in a .NET executable to put up the kind of message you want. But, I could be wrong... RageInTheMachine9532
DumpBin /imports
indicates that the executable has a static reference to_CorExeMain
inmscoree.dll
. The loader won't load the executable ifmscoree
isn't present. So even if you could replace the stub, it wouldn't help. -
DumpBin /imports
indicates that the executable has a static reference to_CorExeMain
inmscoree.dll
. The loader won't load the executable ifmscoree
isn't present. So even if you could replace the stub, it wouldn't help.I was 99% sure it couldn't be done, just because of the reason you specified. :-D I was just looking for a second opinion. About the only way you could do that is to have a second executable check for the existence of the mscore.dll first, maybe with version checking too :), then launch the .NET EXE if it finds it. Thanks! RageInTheMachine9532
-
I was 99% sure it couldn't be done, just because of the reason you specified. :-D I was just looking for a second opinion. About the only way you could do that is to have a second executable check for the existence of the mscore.dll first, maybe with version checking too :), then launch the .NET EXE if it finds it. Thanks! RageInTheMachine9532
I have asked a great Delphi coder to code something that detects if the framework is installed. If it is, it launches my application, if not, it tells the user which version is required (1.0/1.1) and gives the option to install it (from the CD). Very efficient way of doing it. The good thing about it being done in Delphi is that it requires no external DLL or runtime (VB6 would require VBRUN6.DLL). It could also have been done in C++, but we felt Delphi was a better language for this purpose.