josh Posted October 5, 2010 Report Share Posted October 5, 2010 (edited) Hi all, I decided to share a simple, no frills way of writing to *.ini. I needed this feature for some of my unattended installs, and i discovered Windows doesn't provide an easy way to do it. On the contrary. All you have to do is to download NirCmd, and use inisetval command. I suggest you copy nircmd.exe to the same folder as Ketarin. Syntax: inisetval [iNI filename] [section] [key] [value] Writes a value into INI file. If the file doesn't exist, it'll automatically be created. Example: inisetval "c:\windows\test.ini" "section1" "TestValue" "1" Using inisetval with Ketarin: nircmd inisetval "{root}USB-Toolkit\{category}\{appname}\INSTALL.INF" "auto" "auto" "1" & nircmd inisetval "{root}USB-Toolkit\{category}\{appname}\INSTALL.INF" "auto" "alllang" "0" Another example: start "" /wait {root}USB-Toolkit\Backup\Uniextract\UniExtract.exe "{file}" "{root}USB-Toolkit\{category}\{appname}" & start "" /wait nircmd inisetval "{root}USB-Toolkit\{category}\{appname}\ImgBurn.ini" "Settings" "PortableMode" "1" & start "" /wait nircmd inisetval "{root}USB-Toolkit\{category}\{appname}\ImgBurn.ini" "Settings" "FILELOCATIONS_GraphDataFiles" ".\Graph Data Files\" & start "" /wait nircmd inisetval "{root}USB-Toolkit\{category}\{appname}\ImgBurn.ini" "Settings" "FILELOCATIONS_ImageFiles" ".\Image Files\" & start "" /wait nircmd inisetval "{root}USB-Toolkit\{category}\{appname}\ImgBurn.ini" "Settings" "FILELOCATIONS_LogFiles" ".\Log Files\" & start "" /wait nircmd inisetval "{root}USB-Toolkit\{category}\{appname}\ImgBurn.ini" "Settings" "FILELOCATIONS_ProjectFiles" ".\Project Files\" & start "" /wait nircmd inisetval "{root}USB-Toolkit\{category}\{appname}\ImgBurn.ini" "Settings" "FILELOCATIONS_QueueFiles" ".\Queue Files\" & rd "{root}USB-Toolkit\{category}\{appname}\$temp" /s /q & rd "{root}USB-Toolkit\{category}\{appname}\$PLUGINSDIR" /s /q & rd "{root}USB-Toolkit\{category}\{appname}\Uniblue" /s /q NirCmd: Website - http://www.nirsoft.net/utils/nircmd.html Download - http://www.nirsoft.net/utils/nircmd.zip Edited October 5, 2010 by josh Link to comment Share on other sites More sharing options...
Gozi Posted October 13, 2010 Report Share Posted October 13, 2010 Hi josh, !!!!GREAT!!!! I was not searching for that, but now I found it ;-) I think I will use it for my templates and my next project: - loading the apps, descriptions and screenshots with ketarin - generating an INI - parsing the INI with Java script - putting all to gether on a local website ...... and I have my own web based software database, without using apache or sql. That could be nice.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now