Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Needs a reversed Cougar! tuiruru's Avatar
    Join Date
    May 2007
    Posts
    1,577

    Default Some nerdy syntax required

    Hi

    I've go both data and portable apps stored in folders on my USB drive. I want to put a shortcut at the root level of the drive to take me to the portable app launcher that I've got in a folder. The trouble is the drive letter changes depending on the computer I stick it in - on my laptop at home it's "G", on a computer in an office I do voluntary work in it's "E". Is there some sort of path variable I can type into the shortcut dialogue box that will automatically pick up the new drive letter?

    Thanks
    Noli illegitimi carborundorum

    As I hurtled through space one thought kept crossing my mind. Every part of this capsule was supplied by the lowest bidder.
    John Glenn

  2. #2
    Senior Member fred_fish's Avatar
    Join Date
    Sep 2009
    Posts
    1,995

    Default Re: Some nerdy syntax required

    ".\subfolder\program.exe"

  3. #3
    Where is Metla these days Chilling_Silence's Avatar
    Join Date
    Dec 2004
    Location
    Auckland
    Posts
    17,146

    Default Re: Some nerdy syntax required

    That, and you can always manually assign to a letter on both machines that is very rarely used: B!
    I mostly do Bitcoin & DigiByte things these days, feel free to say hi on Twitter: https://twitter.com/dgb_chilling

    Before you ask a question here, or before you get upset by a response, see here:
    http://www.catb.org/~esr/faqs/smart-...ons.html#intro

  4. #4
    Senior Member
    Join Date
    Jan 2005
    Location
    Plimmerton
    Posts
    3,421

    Default Re: Some nerdy syntax required

    fred, I tried that with a win7 shortcut and the program got run but the shortcut subsequently had the drive letter subbed back again. So from here it looks like a one-off solution, only. Also, it wouldn't accept the . part in the 'Startin' box.

    I use the Chill solution which seems to work OK. For example, my ext drive is U:.

  5. #5
    IT Contractor
    Join Date
    Feb 2005
    Posts
    2,677

    Default Re: Some nerdy syntax required

    %CD% is the command line variable for the current working directory, that may be of use. You can always substring it to get the drive letter.
    Windows 7 x64 // i5-3570K // 16GB DDR3-1600 // GTX660Ti 2GB // Samsung 830 120GB SSD // OCZ Agility4 120GB SSD
    Windows 7 x64 // Phenom II 955 // 8GB DDR3-1333 // GTX460 1GB // Corsair Force3 120GB SSD
    Samsung Galaxy S4 GT-I9505

  6. #6
    Needs a reversed Cougar! tuiruru's Avatar
    Join Date
    May 2007
    Posts
    1,577

    Default Re: Some nerdy syntax required

    Quote Originally Posted by Chilling_Silence View Post
    That, and you can always manually assign to a letter on both machines that is very rarely used: B!
    Hi Chill - I'm going abroad so will be using it on all sorts of different machines. Is it possible to tell the USB drive that it will always be, say, "U"? How?
    Noli illegitimi carborundorum

    As I hurtled through space one thought kept crossing my mind. Every part of this capsule was supplied by the lowest bidder.
    John Glenn

  7. #7
    Needs a reversed Cougar! tuiruru's Avatar
    Join Date
    May 2007
    Posts
    1,577

    Default Re: Some nerdy syntax required

    Quote Originally Posted by inphinity View Post
    %CD% is the command line variable for the current working directory, that may be of use. You can always substring it to get the drive letter.
    Hi Inphinity

    "You can always substring it to get the drive letter" - sorry - I don't know what that means
    Noli illegitimi carborundorum

    As I hurtled through space one thought kept crossing my mind. Every part of this capsule was supplied by the lowest bidder.
    John Glenn

  8. #8
    Needs a reversed Cougar! tuiruru's Avatar
    Join Date
    May 2007
    Posts
    1,577

    Default Re: Some nerdy syntax required

    Quote Originally Posted by inphinity View Post
    %CD% is the command line variable for the current working directory, that may be of use. You can always substring it to get the drive letter.
    Hi Inphinity

    "You can always substring it to get the drive letter" - sorry - I don't know what that means
    Noli illegitimi carborundorum

    As I hurtled through space one thought kept crossing my mind. Every part of this capsule was supplied by the lowest bidder.
    John Glenn

  9. #9
    Needs a reversed Cougar! tuiruru's Avatar
    Join Date
    May 2007
    Posts
    1,577

    Default Re: Some nerdy syntax required

    Here's a bit more about the scenario.

    I'm going abroad and taking the USB drive with me, so it will be going onto all sorts of machines. I've got some portable apps on the drive each in it's own folder - all work OK. I installed a portable app Launcher called Codysafe, which again works OK and is in it's own folder. I wanted a shortcut that would launch the launcher from the root directory. I've since discovered that Cody puts a little .exe file in the root directory which will do this, but now I'm just curious how it could be done if that.exe wasn't there.
    Noli illegitimi carborundorum

    As I hurtled through space one thought kept crossing my mind. Every part of this capsule was supplied by the lowest bidder.
    John Glenn

  10. #10
    IT Contractor
    Join Date
    Feb 2005
    Posts
    2,677

    Default Re: Some nerdy syntax required

    Oh, that makes it easier. A batch file in the root that executes
    ..\<CodySafeFolder>\<CodeSafeApp.ext>
    Windows 7 x64 // i5-3570K // 16GB DDR3-1600 // GTX660Ti 2GB // Samsung 830 120GB SSD // OCZ Agility4 120GB SSD
    Windows 7 x64 // Phenom II 955 // 8GB DDR3-1333 // GTX460 1GB // Corsair Force3 120GB SSD
    Samsung Galaxy S4 GT-I9505

Similar Threads

  1. Not sure if this is Nerdy or Geeky - from DOS 'til now
    By tuiruru in forum PC World Chat
    Replies: 0
    Last Post: 06-01-2012, 02:48 PM
  2. One for the nerdy among us: Pirates or Ninjas?
    By sammo450 in forum PC World Chat
    Replies: 32
    Last Post: 12-06-2009, 11:54 AM
  3. Autorun Syntax
    By vroc3135 in forum PressF1
    Replies: 2
    Last Post: 06-04-2003, 10:09 AM
  4. Nerdy modem control
    By craig_b in forum PressF1
    Replies: 2
    Last Post: 22-12-2002, 10:55 AM
  5. firewall / trojans / nerdy stuff
    By markOS X in forum PressF1
    Replies: 5
    Last Post: 20-11-2002, 09:04 PM

Posting Permissions

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