Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Sep 2002
    Location
    Lyncburg VA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Launch local programs from Active Desktop?

    OS=Windoze 98se

    Using an HTML page as a desktop, icons are hidden, is it possible to launch local programs on my system, preferably shortcut (lnk) files? I've tried the simple <a href=, but I get a "File Download" message window asking if I want to download or open it. If I choose open, it will launch the desired app, but that extra step spoils the simplicity. The "Always ask before opening this type of file" is checked on and is grayed out. I'm not sure for security while on-line that I would want that unchecked.

    My goal is to use flash buttons to launch my most common apps, preferably through lnk files, but will settle for clickable images. The latter I have seen on a Vaio system I used to have but I dont have any copies of that desktop to view the code.

    So is there a work around?

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    <script>
    var objShell = new ActiveXObject("WScript.Shell");
    </script>

    <A HREF="javascript:objShell.Run('C:\pathto\program.exe');">click click</A>
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    New to the CF scene
    Join Date
    Sep 2002
    Location
    Lyncburg VA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey Joh6nn, it no workie :(

    I copied your code and pasted in my file, editing the 'C:\pathto\program.exe' to read 'C:\WINDOWS\NOTEPAD.EXE' for a simple test. When the page is first loaded it give me the message:

    An active X control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?
    yes/no

    I answer yes but the created link does nothing, status bar changes to

    javascript:objShell.Run('C:\WINDOWS\NOTEPAD.EXE');

    when the mouse is over the link, clicking it does nothing but the status bar then says "Error on page".

    So far this is a simple HTML page with nothing other than an image displayed in a table, no java scripts, and this new link was place outside of that table. I also tried pointing the link to a shortcut lnk file with no change in behavior.

    <edit>
    Oh yeah, I also tried launching the file in a IE6 window with no change in behavior verses the as an Active Desktop.
    Last edited by Chemical Spill; 09-06-2002 at 06:05 AM.

  • #4
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    i don't know what to tell you. it runs fine on my machine, which is win 98. try checking your security settings, and try downloading the latest version of the Windows Scripting Host, and microsoft.com .
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #5
    New to the CF scene
    Join Date
    Sep 2002
    Location
    Lyncburg VA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well I down loaded Windows Script 5.6 and installed it. And I enabled several things in the security settings, I dont really know what they do but might'a/sorta looked relevant.

    There is now no change in the behavior when the file is opened in a browser window, but as a desktop it opens a new browser window with the "page cannot be found" page displayed. And

    javascript:objShell.Run('C:\WINDOWS\NOTEPAD.EXE');

    appears in the browser address window.

    Are there any errors in my code below that migh cause this? Does the first part need to be in the header or the body? I tried it in both with no change.

    <script>
    var objShell = new ActiveXObject("WScript.Shell");
    </script>

    <A HREF="javascript:objShell.Run('C:\WINDOWS\NOTEPAD.EXE');">click click</A>

    Is this the only solution? I've also tested this on my other systems also running Win98se and they behave exactly the same, no workie.

  • #6
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    i can't help ya, man. it's the only way i know of to do it, and as far as i can tell, you're doing it right. i've given dozens of other people the same answer, and it's always seemed to work for them, and it's working for me on my machine. i can't think of anything that it could be.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.


  •  

    Posting Permissions

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