Results 1 to 8 of 8
  1. #1
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Variables not working

    If I set up a var for Google Chrome like %gChrome% that represents

    C:\WinApps\Comm\Internet\Browsers\GoogleChromePort able\GoogleChromePortable.exe -noextensions

    It runs fine in the "Run" command-line.

    But if I put it in a shortcut, it gives me an error that the variable specified in the Target box is invalid. I have to expand the command [eliminate the variable] and then it of course works.

    Why is this, and how do I correct it?

    Regards,
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  2. #2
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,203
    Thanks
    49
    Thanked 989 Times in 919 Posts
    Have you set the environment variable in the master environment, or just in a local Command Prompt?
    Right click on My Computer and select Properties.
    Click Advanced system settings, Environment Variables.

    cheers, Paul

  3. #3
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    Paul;

    I had the %gChrome% set to

    C:\WinApps\Comm\Internet\Browsers\GoogleChromePort able\GoogleChromePortable.exe -noextensions

    If I do it without the .noextensions, it works. With the -noextensions put into the variable it does not.

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  4. #4
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Chuck,

    Try enclosing it in double quotes, e.g.
    "C:\WinApps\Comm\Internet\Browsers\GoogleChromePor table\GoogleChromePortable.exe -noextensions"
    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  5. #5
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,203
    Thanks
    49
    Thanked 989 Times in 919 Posts
    I assume the space in "\GoogleChromePort able\" is not intended?
    I think the variable is treated differently in a shortcut.
    I'd put it in a batch file in the short term until you find a solution.

    cheers, Paul

  6. #6
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    That didn't seem to do it either, RG. I suppose I just have to run it with all the extensions, or disable them. But then, of course, if I want Chrome with extensions I'd have to reverse it all.

    Oh well...

    Thanks,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  7. #7
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,594
    Thanks
    5
    Thanked 1,059 Times in 928 Posts
    The quotation marks should not include the switch.

    Joe

  8. #8
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    It all works. So, with the command-line as

    %gChrome% --disable-extensions %gCal%

    It loads with "hidden" extensions,
    ---
    Joe/Paul/RG;

    I got totally p/o'd about this, uninstalled the Chrome Portable, installed the offline installer of Chrome, set the three vars (gContacts, gCal, and gChrome) to the paths, and, surprise surprise, it worked first time out.

    The shortcut target is simply

    %gChrome% %gCal (or gContacts)

    I'm not yet sure about the being able to start with no extensions. Still in process.

    Chuck
    Last edited by CWBillow; 2014-02-07 at 15:18.
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

Posting Permissions

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