Page 1 of 1 1
Topic Options
#41860 - 2003-06-20 05:26 AM editing system.ini
oscarg Offline
Lurker

Registered: 2003-06-20
Posts: 4
Loc: NZ
Hi

I want to make a kix script to edit the shell=explorer.exe line in system.ini

I know you can use the write line command to add text to a file but how do you add it to a specific line or replace a line?

Top
#41861 - 2003-06-20 05:28 AM Re: editing system.ini
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Do NOT use WriteLine()!

See the manual for WriteProfileString()
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#41862 - 2003-06-20 05:30 AM Re: editing system.ini
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
OH, curious about what OS you intend to do this on. SYSTEM.INI no longer exists except for backward compatibility. It is a smoke and mirrors view of the registry. You cannot edit it.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#41863 - 2003-06-20 10:15 AM Re: editing system.ini
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Hello Oscarg and welcome to the board.

Please let us know what operating system you are using this on and what version of KiXtart you are using.

quote:
Snipet from:
Administering the Windows NT Registry
http://www.microsoft.com/technet/treeview/default.asp?url=/TechNet/prodtechnol/winntas/maintain/mngntreg/admreg.asp

NT implements mapping by trapping the private profile API routines.
Windows applications and components ordinarily use these calls to get
and set data stored in INI files, but when there's a mapping entry, the
NT kernel first checks for the presence of a mapping key. If one exists,
and if it points to a key that contains data, that data is returned to
the caller. If there's no mapping key, or if it points to an empty or
non-existent Registry key, NT will go ahead and try to read the data
from the INI file. The caller need never be aware that the data didn't
come from the requested file.

Mapping only occurs when there's a mapping key in place. These keys are
stored beneath the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping subkey.
If you look there, you'll notice a number of subkeys with names like Clock.INI, Win.INI,
and SYSTEM.INI. These keys tie sections of the old Win 3.1-style INI files to keys in
the Registry so that old Windows 3.1 components like the Clock and the original media
controller interface (MCI) will continue to find their settings.


Top
#41864 - 2003-06-20 02:49 PM Re: editing system.ini
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Les brings up an interesting point. If you modify the SYSTEM.INI, the client will have to restart anyway for the new settings to take place as this file is read on starting windows.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#41865 - 2003-06-24 10:55 PM Re: editing system.ini
oscarg Offline
Lurker

Registered: 2003-06-20
Posts: 4
Loc: NZ
Hi

I need to change system.ini on about 200 w95 c's
using kix 4.11

Top
#41866 - 2003-06-24 11:24 PM Re: editing system.ini
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
So.. What is it that you need to change?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#41867 - 2003-06-25 12:56 AM Re: editing system.ini
oscarg Offline
Lurker

Registered: 2003-06-20
Posts: 4
Loc: NZ
i need to change the line shell=Explorer.exe in system.ini to shell=thin.exe
Top
#41868 - 2003-06-25 01:38 AM Re: editing system.ini
oscarg Offline
Lurker

Registered: 2003-06-20
Posts: 4
Loc: NZ
Yes i did it

writeprofilestring ("c:\windows\system.ini","boot","shell","c:\thin\thinshellpro.exe")

Thanks for your help people

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 483 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.06 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org