Help replacing path within INIDevo - February 4, 2010 - 3:38pm
I am trying to implement code in a launcher to modify the path to the App directory within an ini. Is there a good example in a launcher or something I could look at/lift out? Below is the ini file. AppDir = "C:\VTPSUHM\" MessagesEnabled = 1 ( categories: )
|

I'm not sure if I understand you right? But, ....
Hi Devo,
Wouldn't it be enough to modify the ini file once, and locate it in the DefaultData folder. And then, replace the drive letter at every startup !
Formerly Gringoloco
Windows XP Pro sp3 x32
I'm sure that would be easy,
I'm sure that would be easy, but I'd rather update the entire path. The reason being is that this is a program I will be using for school and I'm going to have a copy on my laptop and one on my flash drive. The folder paths are different, so I was hoping to not have to manually put in the path for each.
Also, not everybody has the same folder structure, so the default of
might not work for everybody. The path would have to be updated any time a user has a different folder structure. Why not automate the process?
So use some thing
So use some thing like:
at every startup!
Formerly Gringoloco
Windows XP Pro sp3 x32
Still not working
So I tried adding in that code, but it doesn't seem to do anything. The string never gets replaced. Below is my launcher, what am I doing wrong?
You forgot to add the
You forgot to add the directory of the ini file.
As well, you will need to add a 'section name', if you have a look at the ini file you will see the name of the section between [], just above the 'AppDir' entry !
Formerly Gringoloco
Windows XP Pro sp3 x32
Unfortunately there is no
Unfortunately there is no section name, so I tried to just leave it blank. I posted the entire ini in the initial post.
There are only 2 lines in the entire ini
There are a few options you
There are a few options you could try:
Formerly Gringoloco
Windows XP Pro sp3 x32
Adding a section header fixed
Adding a section header fixed it. Now I just need to find where else the settings are hiding. They're not in the registry or in AppData. Anyways, thanks for your help.
cheesy fix. It works, but
cheesy fix. It works, but you're (more) likely to run into trouble. Use ConfigWrite.
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
check out configwrite E.2.11
check out configwrite
E.2.11 ConfigWrite Write value from entry name in config file. Syntax: ${ConfigWrite} "[File]" "[Entry]" "[Value]" $var "[File]" ; config file ; "[Entry]" ; entry name ; "[Value]" ; value name ; if "" then delete Entry ; $var ; Result: ; $var=CHANGED Value is written ; $var=DELETED Entry is deleted ; $var=ADDED Entry and Value are added ; $var=SAME Entry and Value already existToo many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world
GIMP Portable has what you're
GIMP Portable has what you're looking for.
Too many lonely hearts in the real world
Too many bridges you can burn
Too many tables you can't turn
Don't wanna live my life in the real world