I've made a nifty little program in C# that I plan on distributing via CD to students on campus. Problem is, the program obviously won't run unless I've got the right version of .NET (in this case, 2.0) installed.
So, I need to make an executable that will get autorun via autorun.inf that checks to see if .NET 2.0 is installed. If it is installed, it'll then launch my program. If it isn't, it'll launch the .NET 2.0 installer.
I've done a lot of googling on this and tried several things that haven't worked. I clearly need to write this tiny application in a non-.NET language, but at this point, C# and shit are all I remember how to do.
I've tried the following, and have been unsuccessful:
I wrote a .vbs that would do the above check. The .vbs runs fine by itself, but I can't link to it in the autorun.inf. If I do, I get an error. If I try to 'compile' the .exe, it ends up unzipping it to a folder that's not on the CD (obviously), and then it can't find my executables.
I wrote a batch file to do what I need and ran into fairly similiar problems.
So, that leaves me with needing to write this in some programming language I've never used.
Here's some pseudo-code that coves exactly what I need it to do:
If RegistryKey (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v2.0) exists Then
(alternatively I can check if C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 exists)
Run my program
Else
Run .Net 2.0 installer
Run my program
End if
I downloaded Python because it looks like I could pull this off really quickly with it and then compile the code to .exe. Problem is, it returns False for me when I check to see if the folder exists. I have absolutely NO Python experience, so I've got no idea how to fix it.
If anyone knows Python and wants to look at my code, it would be appreciated.
Otherwise, i'm open to suggestions for other really easy languages that I can do this in and then compile down to .exe so the CD'll work.