"Programmatically" can make things a lot more complicated.
Q: How to change xyz.ini
so that the flibber gorgles at a maximum of 50kbps?
A: Change gorgle_kbps
to 50.
Q: How to change xyz.ini
so that the flibber gorgles at a maximum of 50kbps programmatically?
A: Good question! Hmm. You would have to find out which xyz.ini
the service is using, make sure your program has read and write rights on it, make sure your program has the rights to stop the service, quit with a meaningful message if it doesn't (don't forget logging!), stop the service, parse the file, locate the gorgle_kbps
setting (maybe using a number of regular expressions, or by splitting the whole file into its options, taking into account comment lines), change the value, write it back, and then somehow restart the service. For that, you will need root privileges if you're on xöczyk 2.5. It's not possible at all in zargx > 3.5 because processes can't access the ini
file at all there .... etc. etc.
while (true) {}
? Or should I just give up & cook it the way god intended, on my graphics card while playing video games?)