Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# Pin
Keith Barrow29-Apr-11 6:44
professionalKeith Barrow29-Apr-11 6:44 
GeneralRe: c# Pin
OriginalGriff29-Apr-11 8:25
mveOriginalGriff29-Apr-11 8:25 
GeneralRe: c# Pin
Keith Barrow29-Apr-11 8:34
professionalKeith Barrow29-Apr-11 8:34 
GeneralRe: c# Pin
SledgeHammer0129-Apr-11 8:42
SledgeHammer0129-Apr-11 8:42 
AnswerRe: c# Pin
PIEBALDconsult29-Apr-11 17:25
mvePIEBALDconsult29-Apr-11 17:25 
AnswerRe: c# Pin
ambarishtv29-Apr-11 22:51
ambarishtv29-Apr-11 22:51 
AnswerRe: c# Pin
Prasanta_Prince30-Apr-11 7:14
Prasanta_Prince30-Apr-11 7:14 
QuestionFile access permissions in program files folder Pin
lukeer29-Apr-11 3:46
lukeer29-Apr-11 3:46 
Hi experts,

I am under the impression that .NET programs (C# with VisualStudio 2008) always compile to an executable (programname.exe) and a settings file (programname.exe.config). Sometimes there is more to a program, but these two persist. They end up being in the same directory.

I logged on to a WinXP Prof as Admin and installed a .NET program. This program allows to store some data in its programname.exe.config file, which resides in %PROGRAMFILESFOLDER%/Programname/ anlongside with programname.exe.

To 'store' means to
Properties.Settings.Default.MyIntValue = 25;
Properties.Settings.Default.Save();

here.

I ran the program, it worked as expected. Then I logged out and back on as restricted user. The program still worked like a charm.

If I understand correctly, changing and saving in Settings.Default.* is achieved by changing programname.exe.config. How can it be that restricted user is allowed to do so? He's not allowed to change any file through notepad.

And, will this stay possible in Windows Vista and 7?
Or will I have to re-direct the settings file somehow to some %APPSETTINGS% directory for those?

Ciao,


luker

AnswerRe: File access permissions in program files folder Pin
dan!sh 29-Apr-11 5:26
professional dan!sh 29-Apr-11 5:26 
AnswerRe: File access permissions in program files folder Pin
Luc Pattyn29-Apr-11 8:09
sitebuilderLuc Pattyn29-Apr-11 8:09 
GeneralRe: File access permissions in program files folder Pin
lukeer1-May-11 21:04
lukeer1-May-11 21:04 
AnswerRe: File access permissions in program files folder Pin
Luc Pattyn1-May-11 22:50
sitebuilderLuc Pattyn1-May-11 22:50 
QuestionHow to add the data from list to a class objects Pin
Rocky2329-Apr-11 0:59
Rocky2329-Apr-11 0:59 
QuestionRemoving "Back-Slash \" from string Pin
M Riaz Bashir28-Apr-11 23:09
M Riaz Bashir28-Apr-11 23:09 
AnswerRe: Removing "Back-Slash \" from string Pin
loveangel88828-Apr-11 23:15
loveangel88828-Apr-11 23:15 
GeneralRe: Removing "Back-Slash \" from string Pin
M Riaz Bashir28-Apr-11 23:23
M Riaz Bashir28-Apr-11 23:23 
GeneralRe: Removing "Back-Slash \" from string Pin
Richard MacCutchan29-Apr-11 0:46
mveRichard MacCutchan29-Apr-11 0:46 
AnswerRe: Removing "Back-Slash \" from string Pin
Blue_Boy28-Apr-11 23:18
Blue_Boy28-Apr-11 23:18 
AnswerRe: Removing "Back-Slash \" from string PinPopular
David198729-Apr-11 1:30
David198729-Apr-11 1:30 
AnswerRe: Removing "Back-Slash \" from string Pin
Prasanta_Prince29-Apr-11 5:49
Prasanta_Prince29-Apr-11 5:49 
AnswerRe: Removing "Back-Slash \" from string Pin
wizardzz29-Apr-11 7:23
wizardzz29-Apr-11 7:23 
QuestionBinding a Method Pin
dbongs28-Apr-11 21:52
dbongs28-Apr-11 21:52 
AnswerRe: Binding a Method Pin
Pete O'Hanlon28-Apr-11 23:03
mvePete O'Hanlon28-Apr-11 23:03 
GeneralRe: Binding a Method Pin
dbongs28-Apr-11 23:14
dbongs28-Apr-11 23:14 
GeneralRe: Binding a Method Pin
Pete O'Hanlon29-Apr-11 2:32
mvePete O'Hanlon29-Apr-11 2:32 

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.