Click here to Skip to main content
15,904,023 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# Pin
bfis10813710-Jun-13 0:38
bfis10813710-Jun-13 0:38 
AnswerRe: c# Pin
OriginalGriff10-Jun-13 9:09
mveOriginalGriff10-Jun-13 9:09 
QuestionHow to deal with environment variables and non admin users Pin
bfis1081379-Jun-13 2:08
bfis1081379-Jun-13 2:08 
AnswerRe: How to deal with environment variables and non admin users Pin
Eddy Vluggen9-Jun-13 5:06
professionalEddy Vluggen9-Jun-13 5:06 
GeneralRe: How to deal with environment variables and non admin users Pin
bfis1081379-Jun-13 10:30
bfis1081379-Jun-13 10:30 
GeneralRe: How to deal with environment variables and non admin users Pin
Dave Kreskowiak9-Jun-13 13:00
mveDave Kreskowiak9-Jun-13 13:00 
GeneralRe: How to deal with environment variables and non admin users Pin
bfis1081379-Jun-13 20:25
bfis1081379-Jun-13 20:25 
GeneralRe: How to deal with environment variables and non admin users Pin
Dave Kreskowiak10-Jun-13 1:21
mveDave Kreskowiak10-Jun-13 1:21 
That's better.

Two problems. First, normal users can't write to the Localmachine registry hive. Writing this key is something you would do at install time, not run time.

Second, whenever you read or write files, it is best practice to always build a fully qualified path to the file using a well known folder, like CommonAppData. Use Environment.GetFolderPath get the base folder path and the use Path.Combine to build your fully qualified file path from it.

Like you already found, the base folder paths between Windows XP and 7 are different. They can even change between 32 and 64 bit versions of Windows.


modified 10-Jun-13 14:15pm.

QuestionCrystal report login popsup why? Pin
zakirox1238-Jun-13 20:52
zakirox1238-Jun-13 20:52 
AnswerRe: Crystal report login popsup why? Pin
OriginalGriff8-Jun-13 21:59
mveOriginalGriff8-Jun-13 21:59 
GeneralRe: Crystal report login popsup why? Pin
zakirox1238-Jun-13 22:20
zakirox1238-Jun-13 22:20 
AnswerRe: Crystal report login popsup why? Pin
Abhinav S9-Jun-13 5:18
Abhinav S9-Jun-13 5:18 
QuestionSAD_1969_UTM_Zone_23S to WGS84 Coordinate convertion using C# Pin
pvt_infotech7-Jun-13 22:57
pvt_infotech7-Jun-13 22:57 
AnswerRe: SAD_1969_UTM_Zone_23S to WGS84 Coordinate convertion using C# Pin
Bernhard Hiller11-Jun-13 0:05
Bernhard Hiller11-Jun-13 0:05 
QuestionHow to sort serial no in datagridview ,c# Pin
Member 30804707-Jun-13 21:34
Member 30804707-Jun-13 21:34 
AnswerRe: How to sort serial no in datagridview ,c# Pin
Abhinav S7-Jun-13 21:40
Abhinav S7-Jun-13 21:40 
QuestionHow to use product key in my windows application. Pin
ajjuvirgo7-Jun-13 20:04
ajjuvirgo7-Jun-13 20:04 
AnswerRe: How to use product key in my windows application. Pin
Abhinav S7-Jun-13 20:50
Abhinav S7-Jun-13 20:50 
QuestionHow to validate a text box in windows form application using c#. Pin
ajjuvirgo7-Jun-13 20:03
ajjuvirgo7-Jun-13 20:03 
AnswerRe: How to validate a text box in windows form application using c#. Pin
OriginalGriff7-Jun-13 20:18
mveOriginalGriff7-Jun-13 20:18 
AnswerRe: How to validate a text box in windows form application using c#. Pin
Abhinav S7-Jun-13 20:51
Abhinav S7-Jun-13 20:51 
QuestionDoes C# have similar interrupts as embedded C Pin
Member 100880257-Jun-13 13:41
Member 100880257-Jun-13 13:41 
AnswerRe: Does C# have similar interrupts as embedded C Pin
Dave Kreskowiak7-Jun-13 14:02
mveDave Kreskowiak7-Jun-13 14:02 
GeneralRe: Does C# have similar interrupts as embedded C Pin
Member 100880257-Jun-13 16:36
Member 100880257-Jun-13 16:36 
AnswerRe: Does C# have similar interrupts as embedded C Pin
Garth J Lancaster7-Jun-13 14:53
professionalGarth J Lancaster7-Jun-13 14:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.