Solved

Is this one platform independent?

Posted on 2006-07-18
6
319 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to read json value 2 49
Reading the Web.Config using IIS 7.5? 4 36
2 questions 10 25
application restarter  - for an exe that hangs 9 26
Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

772 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