Solved

Is this one platform independent?

Posted on 2006-07-18
6
311 Views
Last Modified: 2010-05-18
Hello is this one platform independent?
Environment.GetEnvironmentVariable("TMP");
0
Comment
Question by:m-jansen
  • 3
  • 2
6 Comments
 

Author Comment

by:m-jansen
ID: 17128555
I mean does it work on linux?
0
 
LVL 35

Assisted Solution

by:Raynard7
Raynard7 earned 75 total points
ID: 17128578
Not necessarily - it depends on what build you are using.  It is unlikley unless it has been manually set
0
 

Author Comment

by:m-jansen
ID: 17128610
Ok. So it mostly works with Windows? (I'm using Environment.GetEnvironmentVariable("TMP"); in an aspx page) I try to find a universal method to find the temporaty folder for the user that surf on that page.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 35

Accepted Solution

by:
Raynard7 earned 75 total points
ID: 17128664
If the environment variable $TMP is set, its value should be used as the directory for temporary files. Otherwise the environment variable $HOME probably will be populated. If neither $TMP nor $HOME is set, use the current working directory
0
 
LVL 48

Assisted Solution

by:AlexFM
AlexFM earned 50 total points
ID: 17128699
Mono supports Environment.GetEnvironmentVariable, you can see this in Mono reference:
http://www.go-mono.com/docs/

I don't know whether Linux has environment variables. If yes, this should work.
0
 

Author Comment

by:m-jansen
ID: 17128837
Ok. Thanks for the info. I now think it's not a good idea to use this method. Rather try to make something that works on the server instead of on the client.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Get String split 5 46
Resolve Dependency Issues 4 44
In WPF / C# binding a local database in code behind 1 24
Angular - break the dataset in chunks? 7 39
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now