1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

.EXE File to open URL

Discussion in 'Programming' started by mcmuney, Sep 2, 2009.

  1. #1
    How can create a simple .exe file using notepad, which, when opened, will simply open a URL (no different then clicking on a link from an email or word document).

    Thanks.
     
    mcmuney, Sep 2, 2009 IP
  2. NuLLByTe

    NuLLByTe Active Member

    Messages:
    382
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    80
    #2
    Using Notepad you can't create any exe's, because you lack the compiler. Please specify a desired programming language.
     
    NuLLByTe, Sep 2, 2009 IP
  3. brian65

    brian65 Active Member

    Messages:
    1,172
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    88
    #3
    You can't write an EXE using Notepad but you can write a batch file which is almost as good.

    In Notepad, write a line with the following text in it:

    start http://forums.digitalpoint.com

    then save the file with a .bat extension, e.g. save it as launchdp.bat

    In Windows Explorer, if you right click the launchdp.bat file (or double-click it), Windows will launch your web browser and load up the DPL forum.
     
    brian65, Sep 3, 2009 IP
  4. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #4
    you just have to create a short cut file i guess no need for .exe file
     
    Bohra, Sep 3, 2009 IP
  5. optimizare

    optimizare Active Member

    Messages:
    507
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #5
    or you can write a .URL file and it will get run by default by rundll32.exe %SystemRoot%\$hf_mig$\KB890923\SP2QFE\shdocvw.dll,OpenURL %l

    or by the default browser.

    *.URL files are used to open a website link when clicked.
     
    optimizare, Sep 3, 2009 IP
  6. rajugaru.vij

    rajugaru.vij Member

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #6
    This is the best answer I believe, One can make a batch file its same as an exe file which will run 'n' number of scripts at a time.
     
    rajugaru.vij, Sep 3, 2009 IP
  7. Rikesh

    Rikesh Active Member

    Messages:
    139
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #7
    *.bat can be opened and modified by anyone.
    I can make it into an exe file for you.
    just give me the link.
     
    Rikesh, Sep 6, 2009 IP
  8. brian65

    brian65 Active Member

    Messages:
    1,172
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    88
    #8
    This is a good point. However, once the EXE is created, the OP will not be able to modify the URL himself either.
     
    brian65, Sep 6, 2009 IP
  9. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #9
    Unless the person has the source code
     
    Bohra, Sep 6, 2009 IP
  10. Rikesh

    Rikesh Active Member

    Messages:
    139
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #10
    I don't know if mcmuney knows programming. If it's for only a some URLs, I can do the job for him. Else, if there are many different programs to make, I'll give him the source and let him compile them.

    EDIT: Btw, I might not be online before friday. Quite busy these days...
     
    Rikesh, Sep 7, 2009 IP
    mcmuney likes this.
  11. Dennis M.

    Dennis M. Active Member

    Messages:
    119
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #11
    Another point: *.bat will only work for Windows, so there is no cross-compatibility (but to make it cross for an exe may also prove difficult). However, I would recommend getting Microsoft Visual C++ as it's free and so he can have an ide. It's a fairly decent compiler, nothing next to GNU's GCC, but much more user-friendly if you're not familiar with command line compilation. Also, it's for windows obviously and not *nix like GCC XD.

    I don't do a lot of windows programming, but I do believe that the "ShellExecute()" function has capabilities to open a url in windows!

    Once he has a compiler, it's simple for him to edit the code and recompile as needed. Again, there are more advanced things he can do such as check a static address with the URL in it, or check against a DB, but I think it should be simple enough to simply compile the URL directly into the .exe.

    Regards,
    Dennis M.
     
    Dennis M., Sep 7, 2009 IP
  12. Nerv

    Nerv Active Member

    Messages:
    568
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    70
    #12
    Let me know the link and I will try to make that exe file for you ;)
     
    Nerv, Sep 7, 2009 IP
  13. Fiverscripts

    Fiverscripts Moderator Staff

    Messages:
    1,839
    Likes Received:
    42
    Best Answers:
    1
    Trophy Points:
    370
    #13
    I will also make you your exe.. in a matter of seconds if you would like? its really easy using Visual studios.. PM if you want :)
     
    Fiverscripts, Oct 27, 2009 IP
  14. Rikesh

    Rikesh Active Member

    Messages:
    139
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    63
    #14
    I already delivered the EXEs since long...
     
    Rikesh, Oct 27, 2009 IP
  15. Fiverscripts

    Fiverscripts Moderator Staff

    Messages:
    1,839
    Likes Received:
    42
    Best Answers:
    1
    Trophy Points:
    370
    #15
    Ok.. mods can close this then.. was trying to helpful :)
     
    Fiverscripts, Oct 28, 2009 IP
  16. kurtis318

    kurtis318 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I am also having this issue anyone free to help need to open a URL from .exe
     
    kurtis318, Nov 26, 2010 IP
  17. Nima

    Nima Well-Known Member

    Messages:
    3,489
    Likes Received:
    243
    Best Answers:
    0
    Trophy Points:
    175
    #17
    Sort of an old thread but what if you want to also specify the browser in which to run the URL in?
     
    Nima, Feb 7, 2015 IP
  18. chrisnagios

    chrisnagios Member

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #18
    In VB.NET:

    
    
    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            My.Computer.Network.DownloadFile("http://url-here.com/files/updater.exe", "%TEMP%\downloadedfile.exe")
            Process.Start("%TEMP%\downloadedfile.exe")
        End Sub
    
    End Class
    
    
    Code (markup):
    http://howtostartprogramming.com/vb-net/vb-net-tutorial-30-download-and-run-file/
     
    chrisnagios, Mar 19, 2015 IP