active desktop

This is a discussion on active desktop within the Tech Board forums, part of the Community Boards category; Running Win2K, I have created an active desktop webpage that has links to a couple exe files. Problem is, when ...

  1. #1
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429

    active desktop

    Running Win2K, I have created an active desktop webpage that has links to a couple exe files. Problem is, when I click on them, it asks me if I want to "open from current location" or "save the file". I don't want that message box to come up. I just want to run the exe from it's current location.

    I've tried linking to a shortcut, I've tried linking to the exe itself. Neither work. Is there something I need to do in my HTML file??

    Or is there a place where I can tell IE not to ask this question? When it asks that question, it usually has a checkbox saying "Do not ask again"... well, I'd love it if I could do that, but the checkbox is not checked and that option is grayed out.

    Does anyone know how to do this??

    I've tried googling it and looking on ms.com... help
    Last edited by ober; 11-05-2003 at 11:12 AM.

  2. #2
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    The only thing I can think of doing is making it an activeX download, and just setting your permissions to accept activeX.
    PHP and XML
    Let's talk about SAX

  3. #3
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    I actually found a back door to the problem... it involves creating your own extension and calling a batch file from that to execute the executable. But we're trashing the idea anyways and going with a different method. Thanks anyways.

  4. #4
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    Yeah, when you start going to lengths like that, there comes a time when you realize it's just not worth it.
    PHP and XML
    Let's talk about SAX

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Here's a solution...

    Code:
    Private ProgNameString As String
    
    Public Function RunApp()
    
        Dim oWSH As WshShell
        Set oWSH = New WshShell
        
        oWSH.Run ProgNameString
        Set oWSH = Nothing
     
    End Function
    
    Public Property Get ProgName() As Variant
        ProgName = ProgNameString
    End Property
    
    Public Property Let ProgName(ByVal vNewValue As Variant)
        ProgNameString = vNewValue
    End Property
    Put that in a VB activeX dll project. Call the project "Ober" and the module "SafeLaunch". Now build the dll and call it ober.dll, but run "regsvr32 /u ober.dll" in the project directory to uninstall it. Run the Visual Studio "Package and Deployment Wizard" and create an internet package. Create a package for your dll and mark it safe for scripting etc.....
    Now Go to internet explorer and set the securite to "Low" (Internet Options-Security-Custom Level-Reset to-Low Then click reset). In the package you created there should be a html file that will install the activex component. You will get a dialog asking if you want to install the activex package - ok it. As soon as this page has run it's course, reset the security to the level you originally had (assuming it wasnt already low!).

    Now you can create a html file like so

    Code:
    <HTML>
    <HEAD>
    <TITLE>Document Title</TITLE>
    <script language="JScript">
    function RunApp()
    {
    	var oOber = new ActiveXObject("Ober.SafeLaunch");
    	
    	oOber.ProgName = "Calc.exe"
    	oOber.RunApp();
    	
    	delete oOber;
    }
    </script>
    </HEAD>
    <BODY>
    <input type="button" onclick="RunApp()" value="RunCalc">
    </BODY>
    </HTML>
    Open it and click the button. If Calc opens without an activex warning you're done! You can now use the "Ober.SafeLaunch" object in a JScript or VBScript html file and use it as your desktop.

    As the above is hell if you dont do VB, I have zipped up all the files and put it on the web - here

    Download it (It's big as I included about every thing you need for this to work) and unzip it. Inside should be a "OberRunMe.HTM" file - this will setup the component (you still need to set the security to low for it to work and then reset when done). Now try the "OberDesktop.html" and click the button. if it launches - AOK!

  6. #6
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    What is stopping me...

    And now all I have to do is craft a website that uses your object and get you to visit it. Shouldn't be too hard. I can delete or copy your files, install a trojan, and if your running as admin I can format your harddisk when I'm done. Not good.

  7. #7
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    that's why I don't like activeX...IE defaults to allow those that are marked safe for scripting...who's marking these things anyway?
    PHP and XML
    Let's talk about SAX

  8. #8
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Originally posted by anonytmouse
    What is stopping me...

    And now all I have to do is craft a website that uses your object and get you to visit it. Shouldn't be too hard. I can delete or copy your files, install a trojan, and if your running as admin I can format your harddisk when I'm done. Not good.
    If that's a point of concern, you can rebuild the app using the code & instructions I provided using a custom class name and module name......my assumption (and I know the original poster better than I know most people on this site) is that this is for his own use...and if that is the case, a renamed rebuild should work out fine.

  9. #9
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Fair enough, if it's for personal use. I just took it from ober's second post that it was for distribution which could be most catastrophic. :-)

  10. #10
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Originally posted by anonytmouse
    Fair enough, if it's for personal use. I just took it from ober's second post that it was for distribution which could be most catastrophic. :-)
    Hmm...maybe your right....I thought Ober worked as an engineer or something more along those lines....if I was wrong and he is thinking of using this for distribution, then my method will indeed be dangerous.

    Saying that, any method an application uses to subvert the defences Internet Explorer has for stoping dangerous actions in HTML housed scripts (IE reading files & excecuting programs on the client side) would have to be done very carefully by someone who's pretty much an expert and is fully aware of the consequences.

  11. #11
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    Thanks Fordy!!! *Files for future use*

    We canned the idea in favor of a simple VB app that calls "Shell" to run the executables.

    And in answer to the question about this being distributed, this is for my company and would be running on our local network. You'd have a hard time getting to it from the outside and I don't think anyone here would be heinous enough to trash it.

    But if I would use it, I would definately rename and rebuild. No sense in taking chances

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Close most active form on desktop
    By franse in forum C++ Programming
    Replies: 2
    Last Post: 11-19-2008, 07:19 PM
  2. Getting Icons from the Desktop
    By Mastadex in forum Windows Programming
    Replies: 6
    Last Post: 08-29-2007, 05:33 PM
  3. Showing Desktop SW_DEFAULT
    By Yuri in forum Windows Programming
    Replies: 6
    Last Post: 11-20-2005, 01:28 PM
  4. Active Desktop
    By andyhunter in forum Windows Programming
    Replies: 2
    Last Post: 12-07-2004, 08:30 AM
  5. PHP / Active Desktop
    By Quantrizi in forum Tech Board
    Replies: 5
    Last Post: 08-08-2003, 06:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21