Topic: Map a .INI File to the Registry  (Read 24003 times)

Map a .INI File to the Registry
« on: June 13, 2019, 01:11:23 PM »

cretino

  • Chef
  • ***
  • Date Registered: Jan 2018
  • Posts: 240
Hello everyone

A lot of software need write permission only for one file .ini
this is old one from best user cdob (I hope he is in good health)

Code: [Select]
http://www.mediafire.com/file/bjjf0iih2l2012k/Map_a_.INI_File_to_the_Registry.7z/file

following this :

Code: [Select]
http://www.winfaq.de/faq_html/Content/tip2000/onlinefaq.php?h=tip2009.htm

im tryin to do the the same thing with windows 1903 but ssametime working and second no !!?

here simple ex under windows 1903:
Code: [Select]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\KeyboardLayout.ini]
@=""
"Preload"="USR:Keyboard Layout\\Preload"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\KeyboardLayout.ini\Keyboard Layout]
@="\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Keyboard Layout"
"Active"="USR:Keyboard Layout"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\KeyboardLayout.ini\Substitutes]
@="USR:Keyboard Layout\\Substitutes"
welcome to anyone interested ...

best regards
« Last Edit: June 13, 2019, 01:14:47 PM by cretino »

Re: Map a .INI File to the Registry
« Reply #1 on: June 22, 2019, 11:12:39 PM »

cdob

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Feb 2014
  • Posts: 44
Current programs don't uses a windows api to access the ini file.
IniFileMapping works at windows api, IniFileMapping can not work at current programs.
Windows 10 GUI may ignore IniFileMapping too, writing ot registry directly, no ini mapping involved.

After some trial and error:

Minesweeper from NT3.1 32bit uses a entpack.ini (from entertainment package) file.
And windows api to access the ini file.

Running Minesweeper at Windows 10 64 bit:
Code: [Select]
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\entpack.ini\Minesweeper]
@="USR:IniFileMapping\\entpack.ini\\Minesweeper"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\IniFileMapping\entpack.ini\Minesweeper]
@="USR:IniFileMapping\\entpack.ini\\Minesweeper"

[HKEY_CURRENT_USER\IniFileMapping\entpack.ini\Minesweeper]
"Color"="1"
.

Minesweeper writes data to the file %userprofile%\AppData\Local\VirtualStore\Windows\entpack.ini now.
Default (admin) user account with UAC enabled.


VirtualStore has a high priority. Disabling virtualstore
Code: [Select]
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableVirtualization"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\luafv]
"Start"=dword:00000004
.
Minesweeper writes data to HKCU\IniFileMapping\entpack.ini\Minesweeper\Color finally.

Windows 10 supports IniFileMapping still.
But it's obsolete nowadays: which current program uses a windows api to access a ini file?

Re: Map a .INI File to the Registry
« Reply #2 on: June 24, 2019, 11:34:59 PM »

cretino

  • Chef
  • ***
  • Date Registered: Jan 2018
  • Posts: 240
hi cdob

thank you for your answer and  time  :hi:

Thank you for clarifying that ( windows api ,and LUA File Virtualization)
ii will do more test ...

Quote
But it's obsolete nowadays: which current program uses a windows api to access a ini file?
Active Eraser ( transfered from my bartpe plugins to the project )

best regards
« Last Edit: June 24, 2019, 11:37:23 PM by cretino »

Re: Map a .INI File to the Registry
« Reply #3 on: June 25, 2019, 04:01:50 AM »

cdob

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Feb 2014
  • Posts: 44
There is a ini2reg.cmd, can be useful for testings.

 

Powered by EzPortal