CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 1999
    Location
    France
    Posts
    29

    Environmental Variable

    Hi everybody

    I want to get the value of an environmental variable (TEMP)

    on the dos prompt, if you enter "c:\set temp" you see TEMP=c:\TEMP

    How can you get the result of a prompt action ( here c:\temp)???

    Generally spoken, how can i get the value of a system variable without passing by the registry?

    thanx
    Fzz




  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Environmental Variable

    Use VB's built in 'Environ' routines, eg:


    MsgBox Environ$("TEMP")
    MsgBox Environ$("PATH")





    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured