Click here to Skip to main content
15,920,513 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help regarding developing windows service Pin
Ron Nicholson10-Jun-13 9:52
professionalRon Nicholson10-Jun-13 9:52 
AnswerRe: Need help regarding developing windows service Pin
Rob Philpott10-Jun-13 10:09
Rob Philpott10-Jun-13 10:09 
AnswerRe: Need help regarding developing windows service Pin
Abhinav S10-Jun-13 20:15
Abhinav S10-Jun-13 20:15 
QuestionHow to draw 3D electron model around Atom using XNA?? Pin
nada 101510-Jun-13 0:59
nada 101510-Jun-13 0:59 
AnswerRe: How to draw 3D electron model around Atom using XNA?? Pin
Richard MacCutchan10-Jun-13 1:48
mveRichard MacCutchan10-Jun-13 1:48 
GeneralRe: How to draw 3D electron model around Atom using XNA?? Pin
nada 101510-Jun-13 1:54
nada 101510-Jun-13 1:54 
GeneralRe: How to draw 3D electron model around Atom using XNA?? Pin
Richard MacCutchan10-Jun-13 2:02
mveRichard MacCutchan10-Jun-13 2:02 
GeneralhI How Can i Expand Window? Pin
SgtSS9-Jun-13 23:41
SgtSS9-Jun-13 23:41 
AnswerRe: hI How Can i Expand Window? Pin
Abhinav S10-Jun-13 0:06
Abhinav S10-Jun-13 0:06 
GeneralRe: hI How Can i Expand Window? Pin
SgtSS10-Jun-13 14:31
SgtSS10-Jun-13 14:31 
QuestionRun RegisterStartupScript multiple times in c# Pin
Jun Xian9-Jun-13 22:05
Jun Xian9-Jun-13 22:05 
Questionstuck in (dll registration in system32 by c#) Pin
Sneha Bisht9-Jun-13 21:01
Sneha Bisht9-Jun-13 21:01 
AnswerRe: stuck in (dll registration in system32 by c#) Pin
Abhinav S9-Jun-13 21:47
Abhinav S9-Jun-13 21:47 
AnswerRe: stuck in (dll registration in system32 by c#) Pin
Dave Kreskowiak10-Jun-13 1:34
mveDave Kreskowiak10-Jun-13 1:34 
Questionc# Pin
zofi519-Jun-13 20:16
zofi519-Jun-13 20:16 
AnswerRe: c# Pin
Abhinav S9-Jun-13 21:49
Abhinav S9-Jun-13 21:49 
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 

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.