Run .bat file from html...?

Discussion in 'HTML' started by Geir, Sep 9, 2009.

  1. Geir

    Geir Guest

    Hi,

    Say I have a windows file share at \\myserver\runthis and in this folder
    I have a .bat file which I need my users to run. The bat file does
    various housekeeping, copies files and installs silently a small
    application etc.

    Is it possible to somehow enter a link to the complete path
    \\myserver\runthis\myfile.bat at an intranet web page and have the file
    downloaded and run at a client?

    It runs nicely at the client computers when pasted in at a command
    console, but it would be more elegant if the weblink opened the console
    window automatically.

    The clients in question run windows xp.

    Thanks for comments on this

    regards geir
     
    Geir, Sep 9, 2009
    #1
    1. Advertising

  2. Geir

    Andy Dingley Guest

    On 9 Sep, 08:44, Geir <> wrote:

    > Say I have a windows file share at \\myserver\runthis and in this folder
    > I have a .bat file which I need my users to run.  


    Where does this bat file run? On the server, or on the user's desktop?

    If it's the server, then you can do this. Find an old reference to CGI
    scripting, but be aware that you need to know what you're doing or
    else there are security hazards.

    If it's on the user's desktop then you can't do this. For good reason
    too (imagine the risk if used for evil purposes). At most you can
    offer the script as a download and then have the users run it
    separately.


    > The bat file does
    > various housekeeping, copies files and installs silently a small
    > application etc.


    Silent installs from the web are a bad idea, as they aren't obvious
    and so create distrust.
     
    Andy Dingley, Sep 9, 2009
    #2
    1. Advertising

  3. Andy Dingley wrote:

    >> The bat file does
    >> various housekeeping, copies files and installs silently a small
    >> application etc.

    >
    > Silent installs from the web are a bad idea, as they aren't obvious
    > and so create distrust.


    Geir: check appropriate software for silent installs, file cleaning etc.
    - i.e. WPKG: http://wpkg.org


    --
    Tomasz Chmielewski
     
    Tomasz Chmielewski, Sep 9, 2009
    #3
  4. On 9 Sep., 11:18, Andy Dingley <> wrote:
    > On 9 Sep, 08:44, Geir <> wrote:
    > > Say I have a windows file share at \\myserver\runthis and in this folder
    > > I have a .bat file which I need my users to run.  


    > Where does this bat file run? On the server, or on the user's desktop?


    You snipped the text out with the concerning information:

    <quote>
    Is it possible to somehow enter a link to the complete path
    \\myserver\runthis\myfile.bat
    _at_an_intranet_web_page_and_have_the_file_downloaded_and_run_at_a_client_?
    </quote>

    So it's on the user's machine. [2]

    [1] > If it's the server, [...]
    >

    [2] > If it's on the user's desktop then you can't do this. For good
    reason
    > too (imagine the risk if used for evil purposes). At most you can
    > offer the script as a download and then have the users run it
    > separately.


    www.turkojan.com - lol
     
    Jan C. Faerber, Sep 9, 2009
    #4
  5. Jan C. Faerber, Sep 9, 2009
    #5
  6. On Sep 9, 1:58 pm, "Jan C. Faerber" <> wrote:
    > >www.turkojan.com -  lol

    >
    > Or try "CIA 1.3" - *ggg*


    http://en.wikipedia.org/wiki/XMLHttpRequest
    I just came accross that topic.
    Obviously it should be possible somehow.

    http://prajax.sourceforge.net/
    That thing might do something you would like to achieve but seems not
    to handle a .bat file directly.
    (the example source on that page:
    http://prajax.sourceforge.net/examples/example_helloworld_prototype.php.txt
    )

    All standards and script handlings of browsers respect
    restrictions for security purposes.
    And even if you find a solution I am curious about
    the 'silent' installation of the 'server's' .bat file.
    I do not know the standard behaviour of windowsXP
    but within Vista they started a security feature
    which will promt always for administration priviliges
    before software claim access to install itself.
    (It is possible to disable this user interaction.)

    http://skypher.com/index.php/2008/05/04/chimera-code/
    http://skypher.com/wiki/index.php?title=Chimera_code
    These links seem to be very interesting!
    If the text is up2date then it would be interesting
    if you could change your .bat file into a .cmd file.
    'Cause these two things are similar but not _exactly_ the same.
    In case you can also run the .cmd file you should be able to
    generate a javascript file that should do the same thing
    like the .cmd file. And then you could use the javascript in your
    page.

    Maybe you give further details of your problem.
     
    Jan C. Faerber, Sep 10, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c29ubnk=?=

    Run a .Bat file on the client machine

    =?Utf-8?B?c29ubnk=?=, Jan 25, 2005, in forum: ASP .Net
    Replies:
    10
    Views:
    7,449
    Kevin Spencer
    Jan 26, 2005
  2. Stuart McGraw
    Replies:
    8
    Views:
    387
    Stuart McGraw
    Sep 23, 2004
  3. chandan
    Replies:
    0
    Views:
    317
    chandan
    Mar 18, 2008
  4. Vlad
    Replies:
    10
    Views:
    1,211
  5. Josh

    Run BAT file with ASP script [ERROR]

    Josh, Oct 23, 2003, in forum: ASP General
    Replies:
    1
    Views:
    273
    Ray at
    Oct 23, 2003
Loading...

Share This Page