27

There is actually a topic asking a very similar thing, however the information there is either out of date (broken links, discontinued solutions) or not suitable for my needs.

I have a showcase for my graduation wherein we have the opportunity to display our work to potential employers. The interface we have to use only allows .jpg, .flv and .exe files, however my project is in HTML / CSS / JavaScript.

Is there any way I can convert my project into a .exe?

(The ways the pre-existing question's answers suggest creating an .exe are now broken links / discontinued as far as I can tell; and alternate answers suggest ways to create standalone applications which do not generate .exes, which are not fit for my purposes)

Cheers!

Eilidh
  • 1,354
  • 5
  • 21
  • 43

5 Answers5

14

Most easiest way is:

1) Download Visual Studio Express Edition(Because it's free).

2) File -> New Project -> Windows Forms Application.

3) Load your current HTML into it.

4) Add WebBrowser control to your project.

5) Deploy your application(Build -> Publish).

Note: The WebBrowser Control use IE by-default. Take a look at this alternative as well.

Community
  • 1
  • 1
Rajender Joshi
  • 4,155
  • 1
  • 23
  • 39
  • 1
    Which version of Visual Studio Express Edition do I want? There are multiple editions there http://www.microsoft.com/visualstudio/eng/downloads#d-2012-express – Eilidh May 16 '13 at 10:25
  • 2
    It's upto you. I only know C#, So I prefer Visual C# 2010 Express – Rajender Joshi May 16 '13 at 10:29
  • 1
    Visual Studio Express 2012 for Windows Desktop. – newb May 16 '13 at 10:45
  • 1
    Okedoke, I'm having trouble Loading the current HTML into it... I added the Web Browser component however I'm not sure where to stick the code to navigate to the HTML. I've stuck in: `webBrowser1.Navigate(@"whereisthepack.html");` to the constructor for Form1 but I'm getting errors. `error C2228: left of '.Navigate' must have class/struct/union` – Eilidh May 16 '13 at 10:52
  • 1
    Check accepted answer here. http://stackoverflow.com/questions/7194851/load-local-html-file-in-a-c-sharp-webbrowser – Rajender Joshi May 16 '13 at 11:51
7

Welcome to 2019!

There's all kinds of different ways to accomplish this now. One popular npm package is npm pkg. There's also the popular Electron (this is what vscode was built on), and quite a few others

mwilson
  • 12,295
  • 7
  • 55
  • 95
  • 2
    This answer would benefit from a concrete example, instead on an aggregation of links. Kudos though for providing a modern answer to an **old** question. – Jon P Apr 11 '19 at 04:25
  • Given the original question provides no concrete example, I provided no concrete example. Vague questions get vague answers. – mwilson Sep 26 '22 at 22:57
1

You Could always turn the HTML file into a HTA file and then convert it into an exe :)

https://www.vbsedit.com/

Tiago Rangel
  • 1,159
  • 15
  • 29
  • Seems like the link is dead! For people who would like to this method, try https://www.vbsedit.com/ – Rojo Apr 17 '20 at 14:56
1

You can create a Windows app from HTML/JS.
Actually it's one of my pet projects:

Scriptonit

I've been using it for a while to create tools for myself, but just recently I decided to make it a proper freeware product. If you're not looking for something very complex and you don't need lots of frameworks & modules, this might be just what you're looking for.

You can download Scriptonit here.

dkellner
  • 8,726
  • 2
  • 49
  • 47
-1

You may try creating a .exe installer to you html file using Inno Setup.

You can use the setup wizard; just select the html file instead of exe when selecting the main exe file

It works somehow like an installed application, it will open in your browser but you can see in the List of Applications. (in control panel)

Jongwoo Lee
  • 774
  • 7
  • 20