C++

Get .Net Framework Version for the .DLL & .EXE files

Working with many app/dev teams it is hard to find which version of Dot Net  an application was designed or made in.

Now if your application server has multiple drives and depending on which drive the application resides it may be hard to find this information.

Let’s assume there are two drives C: and D:.

We will start with D: drive as it is easy.

Now the C: drive is a little more work. The above method wont work because C:  drive has system files and depending on your rights you may not have access to them.

You may get the following error:

But there is a way we can get this accomplished. Good old dos commands to the rescue! We are basically going to get a list of .exe and .dll files from the C: drive and then run the above code against it.

Lets capture the files:

Now we have the .EXE files stored in C_EXE_Paths.txt and we query it for .NET versions and save the output to DotNetFiles_C_EXE.txt

Similarly we have the .DLLfiles stored in C_DLL_Paths.txt and we query it for .NET versions and save the output to DotNetFiles_C_DLL.txt

You might get errors for files that do not meet criteria or fails to list .Net version.

This can be surpressed by using:

The output would be similar to:

Now you can import this in Excel and go crazy!  😉

Additionally, if you want to detect what version of .NETis installed on your server here is a cool utility (ASoft .NET Version Detector) to get you the info, as well as download links to the installer in case you need to download and install.

nvvsvc.exe C++ Runtime Error

If you are getting this error you will be getting a black screen and a mouse pointer only. This will be the same even if you login to safe mode or low graphics mode.

Here is the fix:

If you have another OS installed in the system (you have a multiboot system):
1. Log-in to your computer using another OS (You can use Hiren’s Boot CD/DVD or Ubuntu Live Disc).
2. Locate the root directory of your computer (that disk or partition in which you installed the OS that you can’t open).
3. Locate and open the “windows” folder.
4. Locate and open the “system32” folder under that “windows” folder.
5. Locate and open the “config” folder.
6. Rename Default to Default.bak, Sam to Sam.bak, Security to Security.bak, Software to Software.bak, and System to System.bak
7. You will see a folder named “RegBack”. Open it and copy all of its contents to the “config” folder.
8. Restart the computer and you display should be back.
9. Update the drivers from Nvidia’s site.
10. You’re Done!