Jump to content

IniRead("system.ini", "boot", "shell", " ") always returns explorer.exe

Recommended Posts

Here is something very strange. Take these two absolutely identical files, one named system.ini, the other named system.inf. (They are from a Windows 3.11 setup.)

Create this script in the same folder:

Local $a = IniRead("system.ini", "boot", "shell", "")
Local $b = IniRead("system.inf", "boot", "shell", "")
MsgBox(0, '', $a & @CRLF & $b)

On my Windows 7 32-bit system, the first line returns "explorer.exe" (which does not appear in the file) and the second line correctly returns "progman.exe". 

"explorer.exe" gets returned even if I type in the correct full path of the system.ini file that contains the line shell=progman.exe. The correct item gets returned if I change the filename from system.ini to temp.ini - but "system.ini" always returns explorer.exe. Other keys in the same section are returned correctly, but the combination of "system.ini", "boot", and "shell" always returns "explorer.exe".

I can't find a clue to this anywhere in the help file. My C:\WINDOWS folder has a system.ini (installed by Windows 7 by default), but it doesn't say "explorer.exe" anywhere. Where is this coming from?



Edited by emendelson
Link to post
Share on other sites

Had a similar issue a while ago clicky . It's to do with Windows and ini files. It maps a lot of the "system" ini files to the registry so the iniread function just returns those values. Still seems relevant today although the reg key isn't there. If you rename the ini file to .int or other it works.

InireadSection also fails.

Link to post
Share on other sites

I wasn't aware of this.

And my W10 gave the same result as OP


Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...