strange pathbehavior editinifile and readinifile if compiled

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Djek
Pro Scripter
Posts: 147
Joined: Sat Feb 05, 2005 11:35 pm
Location: Holland
Contact:

strange pathbehavior editinifile and readinifile if compiled

Post by Djek » Mon Aug 09, 2010 8:13 pm

hi all,

I noticed a feature in ms ;

if I compile an exe with readinifile in it, i am forced to put the full path in front of it, if i want the ini-file being read from the location(folder) where the exe is being executed. Same with de editinifile.
If i use readln or writeln this is not nessecary.

Code: Select all

let>path=%CWD%
let>filename=test.ini
WriteLn>%filename%,ttt,this line writes to fullpath
EditIniFile>%path%\%filename%,section,entry,this writes to only the file so i have to put %path%\ in front.
// ReadIniFile> is the same also needs %CWD%\ in front
Maybe a suggestion to explain this behaviour in the helpfiles?
I am aware that, if ms change this behavior, i must rewrite/patch a couple of my scripts , so this is no option.
but there is also a dutch saying tell us its better to change halfway than to get lost totally. :D
kind regards,
Djek

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts