Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows
Thanks in advance,
 
I have an application which has an ini file , Windows 8 is creating ini file for each user in its
directory ("c:\users\guest\appdata\local\virtualstore\program files\My Application\") automatically and if i save settings from application then it saves here instead of
application installed directory which is ("c:\Program files\My Application").
 
Any help/solution will be highly appreciated.
Posted 1-Apr-13 21:22pm
Edited 1-Apr-13 21:34pm
v2
Comments
Kenneth Haugland at 2-Apr-13 2:30am
   
Well, an dINI file is just a text file, so each user could be identeried with a user id or a name, with the settings below. Depending on how large the settings are, you shoul dperhaps consider a SQLite database instead or something like that.
εїзεїзεїз at 2-Apr-13 2:36am
   
Thanks but It works fine on other OS , can i stop it in windows 8 is there any option in windows that it wont create multiple inis

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You should not be trying to store any information under ProgramFiles anyway: security policies make it harder and harder to do as writing to these folders is seen as possible virus activity.
There are many "safe" places you can store data (and ini files are data) - have a look here: Where should I store my data?[^]
  Permalink  
Comments
εїзεїзεїз at 2-Apr-13 3:07am
   
thanks OriginalGriff nice article , actually its a legacy vb application.if i will change the ini file extension that might work , but then i have to change the file path in several other .dot net applications and recompile them etc, i thought there might be a way to do this but looks impossible.
OriginalGriff at 2-Apr-13 3:14am
   
You're welcome - the problem is that from Vista onwards, it has been getting (understandably) harder and harder to write anything in application folders - it may be worth "biting the bullet" and moving them all to a new location now, before a new OS (or OS update even) stops them working completely. And you *know* you will get the blame, not Microsoft! :laugh:
εїзεїзεїз at 2-Apr-13 3:30am
   
:D,yup agrees with you. going to change

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 304
1 Sergey Alexandrovich Kryukov 255
2 Shweta N Mishra 216
3 Maciej Los 210
4 PIEBALDconsult 184
0 OriginalGriff 7,630
1 Sergey Alexandrovich Kryukov 7,022
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,525


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 2 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100