WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

System INI and INI File Topics

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

IniWrite Hangs

 Keywords: IniWrite slow hang sluggish

Question:

General observation: I've noticed a few situations where IniWrite() (which writes the WIN.INI file) is sometimes sluggish. It seems like this ought to be a simple operation (if what we've read on this board is to be believed, it is/should be basically an in memory operation - doesn't even need to write to disk).

I have a script that is exhibiting really weird behavior on the IniWrite() line. The IniWrite() is simply:

IniWrite("some:Section","SomeKey",WinPlaceGet(@NORMAL,someWindowTitle))
Until recently, the script would take a long time (about a minute) to execute this line, but recently, it seems to hang forever. I ran DebugTrace and the file just ends immediately before the IniWrite() line. When I remove the IniWrite() line, the script runs fine.

So, it boils down to: Is there something wrong with IniWrite() or is it something about my system? What might cause this function to be problematical?

Answer:

IniWrite sends a broadcast message to all processes so that they are made aware of a system configuration file change. It is likely that you have some application that is not responding to Windows broadcast messages for some reason and causing WinBatch to hang. You could avoid this problem by, among other things, use 'IniWritePvt' instead of 'IniWrite' or fixing/update/removing the unresponsive process.
Article ID:   W18293
Filename:   IniWrite Hangs.txt
File Created: 2009:09:04:12:03:04
Last Updated: 2009:09:04:12:03:04