File Locations on Win 7
-
Hi, Not sure if this question belongs here but I wondered if there is a location on the disk where I can gaurantee that I can always write a file to under Windows 7. In the good old days of XP I could use C:\ but thats a no-no (I guess it was under XP but hey!). Thanks Tony :thumbsup:
-
Hi, Not sure if this question belongs here but I wondered if there is a location on the disk where I can gaurantee that I can always write a file to under Windows 7. In the good old days of XP I could use C:\ but thats a no-no (I guess it was under XP but hey!). Thanks Tony :thumbsup:
You could use the C:\Users\Public\Documents folder for this. All users on a Windows 7 machine should have access to it.
0100000101101110011001000111001011101001
-
Hi, Not sure if this question belongs here but I wondered if there is a location on the disk where I can gaurantee that I can always write a file to under Windows 7. In the good old days of XP I could use C:\ but thats a no-no (I guess it was under XP but hey!). Thanks Tony :thumbsup:
C:\Users\username\AppData could be just the place you are looking for.
You talk about Being HUMAN. I have it in my name AnsHUMAN
-
Hi, Not sure if this question belongs here but I wondered if there is a location on the disk where I can gaurantee that I can always write a file to under Windows 7. In the good old days of XP I could use C:\ but thats a no-no (I guess it was under XP but hey!). Thanks Tony :thumbsup:
AppData it is. Get the path to this folder using the API
SHGetSpecialFolderPath
withCSIDL_APPDATA
as thenFolder
parameter.«_Superman_» _I love work. It gives me something to do between weekends.
-
AppData it is. Get the path to this folder using the API
SHGetSpecialFolderPath
withCSIDL_APPDATA
as thenFolder
parameter.«_Superman_» _I love work. It gives me something to do between weekends.
Thanks guys that's great :thumbsup: :thumbsup:
-
Hi, Not sure if this question belongs here but I wondered if there is a location on the disk where I can gaurantee that I can always write a file to under Windows 7. In the good old days of XP I could use C:\ but thats a no-no (I guess it was under XP but hey!). Thanks Tony :thumbsup:
Hi, Probably the best bet is to use [CommonApplicationData] folder (C:\ProgramData), one problem though - it's a hidden folder so users will have a problem finding it if they need to. Anyway... I was researching this same topic a few weeks ago. I thought I might share a few links to info regarding this subject: http://blogs.msdn.com/b/cjacks/archive/2008/02/05/where-should-i-write-program-data-instead-of-program-files.aspx[^] http://www.perceler.com/articles1.php?art=specfolder1[^] http://codefromthe70s.org/vistatutorial.aspx[^] http://www.wilderssecurity.com/showthread.php?t=282955[^] Allow write/modify access to CommonApplicationData[^] http://msdn.microsoft.com/en-us/library/aa905330.aspx[^]
-
Hi, Not sure if this question belongs here but I wondered if there is a location on the disk where I can gaurantee that I can always write a file to under Windows 7. In the good old days of XP I could use C:\ but thats a no-no (I guess it was under XP but hey!). Thanks Tony :thumbsup:
-
Hi, Probably the best bet is to use [CommonApplicationData] folder (C:\ProgramData), one problem though - it's a hidden folder so users will have a problem finding it if they need to. Anyway... I was researching this same topic a few weeks ago. I thought I might share a few links to info regarding this subject: http://blogs.msdn.com/b/cjacks/archive/2008/02/05/where-should-i-write-program-data-instead-of-program-files.aspx[^] http://www.perceler.com/articles1.php?art=specfolder1[^] http://codefromthe70s.org/vistatutorial.aspx[^] http://www.wilderssecurity.com/showthread.php?t=282955[^] Allow write/modify access to CommonApplicationData[^] http://msdn.microsoft.com/en-us/library/aa905330.aspx[^]
Thanks for info and the links. It has made me realise that I should not take the lazy way out and need to do things properly. Good to see I am not on my own though :thumbsup:
-
I ran into that too last week on Windows 7, I ended up using Windows\Temp for now I tried Documents Setting\account\Application Data\My Folder but ran into issues with the long names, and file not found when pointing to config files I put in it.
Hmmm windows\temp eh? Didn't think of that. I still think APPDATA is probably the best place (thanks AnsHUMAN and Superman. Tony :cool: