I'd recommend not using that. By default, only Administrators and Power Users can write there. If you write your log there you'll be preventing non-admin users using any application that uses your DLL.
-- Ian Griffiths - Pluralsight http://www.interact-sw.co.uk/iangblog/ -----Original Message----- From: Alex Smotritsky Thanks Dominick, I think I'm gonna go with Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationDat a) -----Original Message----- From: Dominick Baier Hi, string s1 = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData ); this gives you a lot of directories, besides temp - but you can get temp via: string s2 = Environment.ExpandEnvironmentVariables("%temp%"); ----------------------------- Dominick Baier, DevelopMentor http://www.leastprivilege.com -----Original Message----- From: Alex Smotritsky I want to log some things to a text file from a dll I have in the gac. One thought is to log to c:\temp but I don't want to hard code that so I'd like to know what's a good way to find out what the c:\temp directory is on a windows system. Any thoughts anyone has on other places to log to are welcome. I suppose the event log is an option but I'd have to discuss that with my partner on my project as logging to a text file is his idea. =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
