Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Environment Variable: PATH

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Environment Variable: PATH

    Hi Guys.

    How do I retrieve the "PATH" environment variable? I'm using the "Get
    System Information" dialog, second option is "Expand Environment Variable",
    what's the third field? Have tried "Path" but it doesn't seem to work.

    Thanks..

    Best Regards,

    Gary.

    Gary James
    Strategy, South Africa
    Web: www.strategyonline.co.za
    Blog: www.strategyonline.co.za/blog

  2. #2

    Default Re: Environment Variable: PATH

    Hi Gary,

    To retrieve the PATH environment variable, you have to enter PATH in the 3rd
    field.

    For example (line may wrap):
    Set Variable %PATHVAR% to ScriptItem->Get System Information(Expand Environment Variable) of "PATH"

    Does this help?

    Friedrich

    --
    Friedrich Linder
    CEO, Lindersoft
    www.lindersoft.com
    +1.954.252.3910

    "point. click. ship" - that's SetupBuilder 5

  3. #3

    Default Re: Environment Variable: PATH

    Hi Friedrich.

    Wow! Thanks for the quick reply.. That's not working here..
    "COMPUTERNAME" works fine, but "Path" or "PATH" return nothing.. Using the
    latest SB.. Any ideas? Running WinXP Pro.

    Best Regards,

    Gary.

    Gary James
    Strategy, South Africa
    Web: www.strategyonline.co.za
    Blog: www.strategyonline.co.za/blog

  4. #4

    Default Re: Environment Variable: PATH

    Hi Gary,

    Sorry, but I have no idea. I have tested this on all machines here (2000,
    XP, x64, 2003, and Vista) and it always returned the correct PATH
    environment variable. Perhaps your PATH variable is > 1023 bytes. In
    general, the path variable is limited to 1023 bytes. In XP SP this
    increased to 2048 bytes.

    SetupBuilder variables have a 1024 byte limit, so perhaps this is the
    problem.

    HTH,
    Friedrich

  5. #5

    Default Re: Environment Variable: PATH

    Hi Friedrich.

    My path was at 1318 characters (this is a test machine <g>). I reduced that
    to under 1024 (768) but it's still not working.. I'll keep fiddling and let
    you know if I find anything..

    Thanks..

    Best Regards,

    Gary.

    Gary James
    Strategy, South Africa
    Web: www.strategyonline.co.za
    Blog: www.strategyonline.co.za/blog

  6. #6

    Default Re: Environment Variable: PATH

    Hi Gary,

    We are using a Windows API call here: ExpandEnvironmentStrings()

    I don't know if your machine hit another Windows limit :-(
    http://www.lindersoft.com/forums/showthread.php?t=1065

    Friedrich

  7. #7

    Default Re: Environment Variable: PATH

    Hi Friedrich.

    Just ran the same compiled script on a new machine (XP Pro, very little
    installed on it) and I get the same result..

    This is what I'm doing:

    Set Variable %PATHVAR% to ScriptItem->Get System Information(Expand
    Environment Variable) of "PATH"
    Display Message Box "%PATHVAR%" -- "PATH"
    Displays nothing.. COMPUTERNAME works fine though.. Sorry for being a
    nuisance.. I'll keep fiddling this side..

    Best Regards,

    Gary.

    Gary James
    Strategy, South Africa
    Web: www.strategyonline.co.za
    Blog: www.strategyonline.co.za/blog

  8. #8

    Default Re: Environment Variable: PATH

    Hi Gary,

    I have attached my test script (Gary.sb5). It works fine on all machines
    here (see screenshot).

    What happens if you call the ExpandEnvironmentStrings() Windows API from a
    Clarion test application?

    Friedrich
    Attached Images Attached Images  

  9. #9

    Default Re: Environment Variable: PATH

    Hi Friedrich.

    Thanks, I appreciate the help.. Your script did the same as mine this side
    (on 3 machines), it shows nothing in the message box.. I have to leave the
    office in about 5 minutes, I'll play around with the API later this weekend
    and let you know what I find.. Very weird..

    Best Regards,

    Gary.

    Gary James
    Strategy, South Africa
    Web: www.strategyonline.co.za
    Blog: www.strategyonline.co.za/blog

  10. #10

    Default Re: Environment Variable: PATH

    Friedrich's script on XP Pro SP2 laptop

    Jane Fleming
    Attached Images Attached Images  

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. #00015: Is there a system PATH Environment Variable Size Limit in XP?
    By FAQ in forum SetupBuilder FAQs, Tips and Techniques
    Replies: 0
    Last Post: 04-03-2006, 07:42 AM
  2. #00011: How do I add directories to the PATH system environment variable?
    By FAQ in forum SetupBuilder FAQs, Tips and Techniques
    Replies: 0
    Last Post: 02-08-2006, 01:17 AM
  3. Using a variable in Install Files
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 11
    Last Post: 01-24-2006, 01:30 AM
  4. Cannot open and compress service file - error
    By NewsArchive in forum SetupBuilder - NNTP
    Replies: 6
    Last Post: 12-06-2005, 04:40 AM
  5. Duplicate entries in Edit Environment Variable
    By sphair in forum SetupBuilder
    Replies: 2
    Last Post: 11-24-2004, 01:50 AM

Posting Permissions

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