Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. System Admin
  4. Windows desktop shortcut question

Windows desktop shortcut question

Scheduled Pinned Locked Moved System Admin
questiondebugging
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robert Palma Jr
    wrote on last edited by
    #1

    I want to create a GUI shortcut to launch and executable that is in a nested directory. Specifically I need this shortcut to NOT need to know it's own directory name, i.e. I cannot supply the full path. The executable is in: C:\appdir-YYYYMMDD\debug\app.exe The shortcut is in directory: C:\appdir-YYYYMMDD The YYYYMMDD changes but I would like the shortcut to always run the executable that is nested below it. If I create a Shortcut and make the "Target" debug\app.exe or .debug\app.exe or .\debug\app.exe Windows complains that the target does not exist. Is there any way to do this? Many thanks, Robert

    D 1 Reply Last reply
    0
    • R Robert Palma Jr

      I want to create a GUI shortcut to launch and executable that is in a nested directory. Specifically I need this shortcut to NOT need to know it's own directory name, i.e. I cannot supply the full path. The executable is in: C:\appdir-YYYYMMDD\debug\app.exe The shortcut is in directory: C:\appdir-YYYYMMDD The YYYYMMDD changes but I would like the shortcut to always run the executable that is nested below it. If I create a Shortcut and make the "Target" debug\app.exe or .debug\app.exe or .\debug\app.exe Windows complains that the target does not exist. Is there any way to do this? Many thanks, Robert

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      No, not without outside help. The shortcut has to have the directory name at least in it's "Start In" box. Without it, there is no telling what the current directory will be when the shortcut is launched, therefore, the shortcut will try to launch the app from a subdirectory of ANY directory that happens to be current at the time. An alternative would be to launch your application from a VBScript (*.vbs) file instead of a shortcut. Or, have a VBScript figure out what the path should be, then create a new shortcut with the appropriate information and launch that. Dave Kreskowiak Microsoft MVP - Visual Basic

      R 1 Reply Last reply
      0
      • D Dave Kreskowiak

        No, not without outside help. The shortcut has to have the directory name at least in it's "Start In" box. Without it, there is no telling what the current directory will be when the shortcut is launched, therefore, the shortcut will try to launch the app from a subdirectory of ANY directory that happens to be current at the time. An alternative would be to launch your application from a VBScript (*.vbs) file instead of a shortcut. Or, have a VBScript figure out what the path should be, then create a new shortcut with the appropriate information and launch that. Dave Kreskowiak Microsoft MVP - Visual Basic

        R Offline
        R Offline
        Robert Palma Jr
        wrote on last edited by
        #3

        Thanks Dave. I won't bang my head any more. Robert :-)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups