SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Feb 2007
    Posts
    325
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    start a program with double clicking Icon on desktop

    Our Java Web Start program can be run using a URL. This is usually how I call it by passing an address to ie.

    Once it is installed it actually creates an Icon on the desktop to launch the now cache code.

    If I open up the Icon I get the path its calling.

    C:\Windows\SysWOW64\javaws.exe -localfile "C:\Users\user1\AppData\LocalLow\Sun\Java\Deployme nt\cache\6.0\38\184a30a6-5def7752"

    So if I just double click the link this runs the program and is a tad quicker than calling the code again through IE.

    But when I try to record these steps nothing is recorded. (do I need to have my desktop as my application configuration)?

    Obviously this cached version name is different for each computer and could change over time, so the only consistent way is to double click the link. But that doesn't work.
    Any Idea?

  2. #2
    Member
    Join Date
    Feb 2009
    Posts
    95
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Hi,

    for interacting with the desktop you need an application configuration for explorer.exe

  3. #3
    Advanced Member
    Join Date
    Jan 2002
    Location
    Detroit, Michigan
    Posts
    522
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Simpler, why don't you just execute the command line using something line ShellExecute?
    //*eggbox

  4. #4
    Member
    Join Date
    Feb 2007
    Posts
    325
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Simpler, why don't you just execute the command line using something line ShellExecute?
    Because you can see from my link (and what I explained before) the program I'm running is a cached version of it with some generated name. Not only would that be different for each machine, but if when a new version comes down I assume that changes as well.


    for interacting with the desktop you need an application configuration for explorer.exe
    This is what I was fearful of. The way I open this program is in its own Function. Because its a Sub Function I call, I would need to add the application configuration to EVER script that calls in. You probably are asking why don't you just add the Application Configuration to the Function Script. I wish I could, but Silk Tests Application Configuration is inherited by the Script that calls it. (so it doesn't matter what my application configuration is on Sub Function Scripts).

    I wish Silk Test would change it, that if a Parent Script HAS an application Configuration then it uses it, if not, try to use the local or its own Application Configuration. We wouldn't run into this problem were I would need to add an Application configuration to every script, even though its the sub script Function that needs that application.

  5. #5
    Advanced Member
    Join Date
    May 2006
    Location
    United Kingdom
    Posts
    742
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    As Eggbox explained , command line !

  6. #6
    Member
    Join Date
    Feb 2007
    Posts
    325
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    as I explained... its not the same every time. If somebody wants to explain how to Open Java Web Start program from the command line I would be happy to learn.

  7. #7
    Member
    Join Date
    Feb 2009
    Posts
    95
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    Hi tubaloth,

    You can start a desktop shortcut (typically a .lnk file) by passing the name of the shortcut file to cmd.exe like this:

    cmd /C "C:/Users/your_user_name/Desktop/name_of_your_shortcut.lnk"

    Note that you do not need an application configuration for the explorer.exe in this case.

  8. #8
    Member
    Join Date
    Feb 2007
    Posts
    325
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0
    So at first I didn't think I could call the link because the user name would be different on each machine. But I remembered I could .net had a way to find the current user.

    I was trying to us the Shell Command.

    Shell("C:\Users\"& Environment.UserName &"\Desktop\CS - Acceptance.lnk")

    But I get an error the file doesn't exist. I know it does, I even output this line out copy and past it in a dos window and it opens the program just fine. The only problem I can think of is it needs an EXE ?


    So then I tried this

    Shell("cmd /C 'C:\Users\"& Environment.UserName &"\Desktop\CS - Acceptance.lnk'")


    And that runs (no errors), but nothing happens on my computer.

    Any idea?

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:10 PM.

Copyright BetaSoft Inc.