pingthis Posted April 28, 2004 Share Posted April 28, 2004 (edited) Ok I am fairly new to AutoIT but have been getting along so far. I am trying to make an entry in the system.ini file under the [mci] section. I can not get it to work at all. I get no error message, nothing. if I change the section to any of the oter sections or create a new section the ini file edit works correctly. Here is the line, with $Files being the full path to the system.ini: IniWrite($files, "mci", "poop", "true") What gives? Anyone else run across this? Edited April 28, 2004 by pingthis Link to comment Share on other sites More sharing options...
Developers Jos Posted April 28, 2004 Developers Share Posted April 28, 2004 test the returncode to see what happends: $rc=IniWrite($files, "mci", "poop", "true") if $rc then ; Success: Returns 1. else ; Failure: Returns 0 if file is read-only. endif SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
pingthis Posted April 28, 2004 Author Share Posted April 28, 2004 I get a return code of 1 But still no entry in the system.ini Thanks Link to comment Share on other sites More sharing options...
CyberSlug Posted April 29, 2004 Share Posted April 29, 2004 (edited) Strange... Really strange. Same behavior here on Windows XP Pro sp1. I can write to other sections but not mci.... My system.ini file looks like: ; for 16-bit app support [drivers] wave=mmdrv.dll timer=timer.drv [mci] [driver32] [386enh] woafont=dosapp.FON EGA80WOA.FON=EGA80WOA.FON EGA40WOA.FON=EGA40WOA.FON CGA80WOA.FON=CGA80WOA.FON CGA40WOA.FON=CGA40WOA.FON Edit: It does not even work on a copy of the file Bug in IniWrite? Edited April 29, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Administrators Jon Posted April 29, 2004 Administrators Share Posted April 29, 2004 Not unless you can see a bug in the code, which is tiny: void AutoIt_Script::IniWrite(VectorVariant &vParams, Variant &vResult) { char szFileTemp[_MAX_PATH+1]; // Get the fullpathname (ini functions need a full path) Util_GetFullPathName(vParams[0].szValue(), szFileTemp); if (WritePrivateProfileString(vParams[1].szValue(), vParams[2].szValue(), vParams[3].szValue(), szFileTemp)) WritePrivateProfileString(NULL, NULL, NULL, szFileTemp); // Flush else vResult = 0; // Error, default is 1 } // IniWrite() Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Valik Posted April 29, 2004 Share Posted April 29, 2004 I get messed up results on this particular file all the way around. I can't even begin to explain it, but I can actually get it to set stuff that doesn't appear (IniWrite) then read that back in (IniRead), yet my text editor (Nor DOS edit) show any of what I'm reading/writing. 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