Click here to Skip to main content
15,887,214 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Standalone .NET framework exe Pin
Dave Kreskowiak21-Jul-13 10:57
mveDave Kreskowiak21-Jul-13 10:57 
GeneralRe: Standalone .NET framework exe Pin
LostTime7621-Jul-13 13:32
LostTime7621-Jul-13 13:32 
GeneralRe: Standalone .NET framework exe Pin
Dave Kreskowiak21-Jul-13 14:53
mveDave Kreskowiak21-Jul-13 14:53 
GeneralRe: Standalone .NET framework exe Pin
LostTime7621-Jul-13 15:05
LostTime7621-Jul-13 15:05 
GeneralRe: Standalone .NET framework exe Pin
Dave Kreskowiak22-Jul-13 1:50
mveDave Kreskowiak22-Jul-13 1:50 
GeneralRe: Standalone .NET framework exe Pin
LostTime764-Aug-13 9:22
LostTime764-Aug-13 9:22 
GeneralRe: Standalone .NET framework exe Pin
Pete O'Hanlon4-Aug-13 9:51
mvePete O'Hanlon4-Aug-13 9:51 
GeneralRe: Standalone .NET framework exe Pin
LostTime764-Aug-13 10:19
LostTime764-Aug-13 10:19 
Haha, glad to see a person with jesus status is interested. Unfortunately, I have not worked out all the kinks yet such as the placement of the system32 dlls. I believe I tried them in the framework folder at one point and it worked, but I can't remember. Today I started from scratch and tested the WPF portion, because ultimately, we want a nice WPF UI to be able to run without .NET installed. Also, there is the issue of the wow6432 node as well.

Overall, I have to make essentially a shim program that does all of the above and checks various things on the system, one of them being if the system is 64 bit and putting the registry entires in the proper place. This will be done in native win32 c++. However, since all we are doing is modifying the registry, unpacking and copying files, and run processes through CreateProcess, this shim should not be hard to do.

Once I get that up and running with all the needed components, I could write an article. Keep in mind that that all sprouted from the fact that we wanted a custom branded WPF UI on a computer without the .NET framework installed. The user can of course spend 20 seconds installing the framework, but then they see the crusty default win32 installer UI. We wanted to make it so that the entire process of installing our program AND the full .NET framework resided in our custom branded UI. If the user is willing have a delay of 5 seconds before they see our screen due to the fact the framework is not installed initially, I think that is acceptable. 5 seconds is relative to tests that I did awhile ago with extracting 7z files into a folder. It could very well be much shorter on a modern SSD based computer. I am testing on a very old 5400RPM harddrive core 2 duo system with XP on it, because that is our base metric.

It turns out that its very simple to do all the things that I once thought were magic such as getting your program to show up as a program in windows and the control panel. Its 2 registry keys. Add a few more registry keys and now you are on the right click context menu on the desktop. I think I have learned more about how the windows registry works in these past couple of weeks than I have since I became a programmer more than half a decade ago. It's also more than I wanted to know too.

I was throwing around various ideas in order to attempt to meet our requirements. My first idea was to write the program in mono and a UI in GTK to do what we wanted. This is because you can distribute a standalone exe and have it work. However, mkbundle sucks on windows, and I posted several problems in trying to get that work on their forums. Of course, nobody cares on their forums. On the bright side, you can package a few dlls with your exe in mono and it just simply works. This is because mono does not rely on the windows registry at all and will look for the dll's it needs in a defined directory. You need to define a lib folder and a root folder and that's it. Even though to get the mono solution working was easy, I just kept coming back to: "Nothing can beat WPF, nothing can beat WPF". Its true in my opinion. After trying out GTK for a few days, you realize how awesome WPF really is with its layout system and just everything about it.

The next idea was to use silverlight. The SL installer takes about 9 seconds on the machines I tested with. With this option, I was planning on making a bare simple mono GTK UI with the method described above that just popped up a custom branded windows that told the user "Please wait, installer initializing" while silverlight silently installed in the background. Then I could use silverlight with the power of WPF to make our custom branded UI after that. This turned out to be doable, and I even tried to reroute registry keys so that I could run silverlight from a directory other than the install directory just like I accomplished with the .NET option. Even though I got my application to run, there are problems with this mechanism. The first is that its hard to pass command line arguments to a silverlight program. The second is that now we have 3 technologies working in our system: mono, silverlight, and .NET when it comes down to installing the real program. A little bit of a head scratcher when trying to figure out what is going on. I would have to tell my boss that it would be hard to wrap his head around what was going on. Therefore, this option is out.

Finally, with my method described with the .NET redist, you only have a single framework: .NET and WPF AND you can pass command line arguments to the program. The program has full trust and a powerful UI framework to go with it. Any control libraries I make for the .NET redist in WPF I can then reuse in my real .NET app that we are packaging with the installer.
GeneralRe: Standalone .NET framework exe Pin
Dave Kreskowiak20-Jul-13 9:47
mveDave Kreskowiak20-Jul-13 9:47 
GeneralRe: Standalone .NET framework exe Pin
LostTime7620-Jul-13 10:30
LostTime7620-Jul-13 10:30 
GeneralRe: Standalone .NET framework exe Pin
Dave Kreskowiak20-Jul-13 10:38
mveDave Kreskowiak20-Jul-13 10:38 
GeneralRe: Standalone .NET framework exe Pin
LostTime7620-Jul-13 11:01
LostTime7620-Jul-13 11:01 
AnswerRe: Standalone .NET framework exe Pin
Eddy Vluggen20-Jul-13 23:36
professionalEddy Vluggen20-Jul-13 23:36 
AnswerRe: Standalone .NET framework exe Pin
jschell21-Jul-13 9:50
jschell21-Jul-13 9:50 
GeneralRe: Standalone .NET framework exe Pin
LostTime7621-Jul-13 14:12
LostTime7621-Jul-13 14:12 
QuestionInvoke from MASM Assembly Language Pin
Derek Tortonian16-Jul-13 7:57
Derek Tortonian16-Jul-13 7:57 
AnswerRe: Invoke from MASM Assembly Language Pin
Pete O'Hanlon16-Jul-13 8:38
mvePete O'Hanlon16-Jul-13 8:38 
GeneralRe: Invoke from MASM Assembly Language Pin
Derek Tortonian17-Jul-13 7:14
Derek Tortonian17-Jul-13 7:14 
GeneralRe: Invoke from MASM Assembly Language Pin
Dave Kreskowiak17-Jul-13 7:26
mveDave Kreskowiak17-Jul-13 7:26 
GeneralRe: Invoke from MASM Assembly Language Pin
Derek Tortonian17-Jul-13 7:28
Derek Tortonian17-Jul-13 7:28 
GeneralRe: Invoke from MASM Assembly Language Pin
MicroVirus17-Jul-13 11:24
MicroVirus17-Jul-13 11:24 
QuestionMysql query with date conditions not working in server Pin
ven75312-Jul-13 4:10
ven75312-Jul-13 4:10 
AnswerRe: Mysql query with date conditions not working in server Pin
NotPolitcallyCorrect12-Jul-13 4:52
NotPolitcallyCorrect12-Jul-13 4:52 
AnswerRe: Mysql query with date conditions not working in server Pin
jschell12-Jul-13 13:42
jschell12-Jul-13 13:42 
AnswerMessage Closed Pin
14-Jul-13 2:26
Member 1015486914-Jul-13 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.