I am trying to use a batch file to determine the currently installed drive letter and to replace a keyword in the ini file with the drive letter.
Basically the ini file contains:
[app] dir=Drive\ApplicationPath path=Drive\ApplicationPath\Messenger.exe ver_number=12091 lang=1033 theme=default ver=intl [applist] Cafe=Drive\ApplicationPath\ApplicationData im=Drive\ApplicationPath1\ApplicationData
And so on.
What I'm trying to do is to put the bat file into the directory containing this app.ini file to detect the current drive. Some users might have this directory in D: , E: , F: and then to rewrite this app.ini file, replacing the word "Drive" into the drive letter D: , E: or F:
I've thought of using Tokens and Delims but I'm not exactly sure how to work it out. Any expert advice? I'm only looking for batch method because a batch file will cover all I need (detect Windows XP or 7, x86 or x64 and eventually copying this ini file to the correct folder on the OS to run).