Member Avatar for Member #93203

Hello,

Sorry if this has already ben posted elsewhere, ive tried looking for it but no luck.

I have done a project in VB 6 and got an exe from it. Im trying to put the exe in a web page, and make it run permanently from there. I cant find any resources on msdn or google or anywhere with this, was wondering if anyone has any idea how to do this?

Im sticking with VB 6 because its easy to set up tcp/ip clients and servers using the winsock control, tried VB.net but still not getting the hang of it yet.

Thanks

Dani AI

Generated

Short answer: you cannot make a browser silently download-and-run a VB6 EXE on a visitor’s PC. Browser vendors block that for security, so a web page can offer a download or a user-initiated launcher only — it cannot auto-start arbitrary EXEs. This is the reason ’s “not possible” reply is correct in spirit; the old approaches (applets/ActiveX) required browser plugins and user trust and are no longer practical or safe. (stackoverflow.com)

What used to work: Java applets or ActiveX controls (Internet Explorer) could embed native functionality in a page, and ClickOnce could make .NET installs easier — but applets and many NPAPI plugins are deprecated/removed, and ActiveX is limited to legacy IE/IE‑mode scenarios. ClickOnce still exists for .NET but needs compatible browser settings and explicit user acceptance. These are fragile paths today and not recommended for broad public deployment. (docs.oracle.com)

Safer, practical options:

  • If the EXE must run on the client, require users to install the app and then use a custom URL protocol (myapp://) or a browser extension to launch it from a page. Registering a URI handler is a standard Windows approach (registry keys or app manifest). Example registry layout (installer does this) shows the idea:
HKEY_CLASSES_ROOT\myapp
  (Default) = "URL:MyApp Protocol"
  "URL Protocol" = ""
  DefaultIcon\(Default) = "C:\Program Files\MyApp\MyApp.exe,1"
  shell\open\command\(Default) = "\"C:\Program Files\MyApp\MyApp.exe\" \"%1\""

Registering a URI scheme or using navigator.registerProtocolHandler requires the user to have the app installed and to accept the action. (learn.microsoft.com)

If you control the environment (intranet) or want always‑on behavior, run the logic server‑side: host the VB6 binary as a service or wrap it with an HTTP/WebSocket API and have the browser talk to that service. For a modern long‑term solution, consider porting the network code to a service or to .NET (then use ClickOnce or an installer), or package a desktop client (Electron/.NET) that talks to your server — all of which avoid trying to force an EXE to run directly from a web page. (stackoverflow.com)

Relevant follow-ups: — if Winsock is the only reason you used VB6, consider a small server wrapper or port the TCP code to .NET; — for a C# EXE, ClickOnce or a URI handler are the least painful client-side options, but both require an install step and user consent.

Recommended Answers

All 3 Replies

Not possible. You'll have to use a language like Java to create an applet or create something in .net via active x.

Member Avatar for Member #93203

Thanks. I was trying to avoid java, but i'll look into .net and activex.

Thanks. I was trying to avoid java, but i'll look into .net and activex.

Hi ,

I am also facing a same problem i want to run windowsbased application (an exe file) which is developed using c# , from a web page on click of a button from webpage .

Is it possible using any activex control or any solution that you have found ,

with regards and thanks,
santy555

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.