Results 1 to 6 of 6

Thread: How can i run application from VBScript

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2001
    Location
    India
    Posts
    4

    Question How can i run application from VBScript

    Hi friends,

    I want to run an application on Client Side when they visits webpage both in Win98 & win Nt ( I know how to do it if client system is win NT )

    I need a way that i can do this in both win98 & win NT

    is there another way to do this ?
    ( If i can include registry key with vbscript than also it's ok coz. throught registry i can run app. atleast once )

    Your expertise on this topic is extremely needed

    Pl. Im learning VBScript

    Thankz...

    -Bhargav

  2. #2
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    280
    hi,

    I think that you will have problems with this...

    Normally the browser will (should) stop anything like this. (otherwise what stops someone writting a webpage that runs something on the client that in not good (like shelling a del *.* in the system 32 dir!)).

    I have code that indeed does this but they are really browser exploits and some have been patched....

    ---

    Having said that I did a activex control to do a similar type of thing.

    On our intranet the users wanted a set of buttons on a -portal- webpage. These buttons would be marked word/excel/mailbox etc.... clicking the button on the webpage the users wanted the appropriate app to run...

    Although I said that this was dodgy, the business overruled me. I created a control that, when given an app name from a javascript, it then located where the app is on the machine (as user have app installed differently etc..). It then shells the app in question, which runs.

    I can enclose my workbook if it helps although this doesnt really answer your first question...

    If this would be usefull I will enclose, cheers, A.J.P

  3. #3
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    hi

    I am also looking for the ans. and its not a bug which needs to be exploited because, hotmail.com opens up windows messenger on your pc if you have one.

    Do let me know if any one finds it out.

  4. #4
    Hyperactive Member dRAMmer's Avatar
    Join Date
    Oct 2001
    Location
    strangelans
    Posts
    463

    this is the queston i've been asking

    tnk God that sum1 have a similar objective as i am.

    jpritchard, cud u share to me the code u did on javascript.

    additionally, how would i use an activeX ctrl's method on vbscript? for example, i used kodak's image edit ctrl. i was able to pass on its width,height and other of its basic properties. my problem is that if i tried to show an image through its DISPLAY method, nothing happens.

    so, how would i use a method of an activeX ctrl.
    live, code and die...

  5. #5
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Earth
    Posts
    762

    Cool

    ye it's possible thru ActiveX controls...

    u can use
    <Object clsid = "10245-256812-696547"> tag ..

    but if the security for ActiveX controls not allowed then ????????

  6. #6
    Hyperactive Member
    Join Date
    Feb 2001
    Posts
    280
    hi dRAMmer,

    Im not sure how similar our requirements are..... but am happy to share code..

    enclosed is my workbook - also in the zip file is a html file,

    dump the content of the zip into a subdir under wwwroot

    as shahid said controls are loaded via the object tag

    in my app I just passed in a string to the control, from the webpage as the method was called

    (
    the javascript has the following

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function RunExcel()
    {
    uclaunch.Application_Execute("... big fat sting ...")
    }
    -->
    </script>

    which executes a sub in my vb

    Public Sub Application_Execute(regpathkey As Variant)
    )

    ---
    but thats pretty rubbish - I should have made the parameter passed a property instead...
    ---
    in the control

    Public Property Let myprop(ByVal tmpstring As String)
    ...some code.. like myglobalvar = tmpstring
    End Property

    and in the html..
    .
    .
    <FORM NAME="myform" ID="myform">
    <OBJECT ID="myctrl"
    CLASSID="CLSID:00000000-0000-0000-0000-000000000000"
    CODEBASE="myctrl.CAB#version=12,0,0,0">
    </OBJECT>
    </FORM>
    <script language="JScript">
    document.myform.myctrl.myprop = "mybigstringx--x";
    document.myform.myctrl.myprop.mainmethod();
    </script>
    .
    .

    so something similar....

    send me some code U are trying with the kodak control and I will have a go....

    cheers, A.J.P

    ps - as shahid said - if activex have been disabled on the your pc (or your users pc's), then this all activex controls will fail - (when this happens I encourage my users to understand the zones and add the site in question to the trusted zone (where it is normal to allow actxcontrols to run..) )

    is that ok?
    Attached Files Attached Files

Posting Permissions

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



Click Here to Expand Forum to Full Width