SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    run an .exe file

    Code:
    <HTML>
    <head>
    <script language="javascript1.1">
    </script>
    </head>
    <BODY>
       
       <a href="#" onclick="var Shell = new ActiveXObject('WScript.Shell');
       Shell.Run('\\Pc07-524-4\db\RegisterMark.exe')">Execute</a>
    </BODY>
    </HTML>
    the error i get is "The system cannot find file specified!"

    Which is the right way of accessing a file from a network?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,252
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    javascript with ActiveX

    Is the path to your exe file right?
    \\Pc07-524-4\db\RegisterMark.exe
    Or maybe you need to use joliet naming?

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    The path is correct, absolutly.
    Can you be more explicit concerning second question

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,252
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    joliet names

    If you right click on a folder and click properties, you'll see "MS-DOS" name.
    These are never more than 8 characters long. Names are truncated like this:
    JavaScript becomes JAVASC~1
    JavaScriptPopups becomes JAVASC~2
    javascriptReference becomes JAVASC~3
    Images stays IMAGES (but in upper case)
    Media stays MEDIA (but in upper case)
    MediaScripts becomes MEDIAS~1
    etc.
    I have found that at times when working wiith Java I have had to use the MS-DOS (joliet) names when specifying paths.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •