-
hi,
i want to be from a button to be able to change the following line in c:\windows\system.ini
shell = explorer.exe
to
shell = merlinos.exe
and also if possible to back up the original before the changes are made.
Cheers
Merlin ?
Are you confused because i certainly am ?
-
Code:
Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Public Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Public Function readini(strsection As String, strkey As String, strfullpath As String) As String
Dim strbuffer As String
Let strbuffer$ = String$(750, Chr$(0&))
Let readini$ = Left$(strbuffer$, GetPrivateProfileString(strsection$, ByVal LCase$(strkey$), "", strbuffer, Len(strbuffer), strfullpath$))
End Function
Public Sub writeini(strsection As String, strkey As String, strkeyvalue As String, strfullpath As String)
Call WritePrivateProfileString(strsection$, UCase$(strkey$), strkeyvalue$, strfullpath$)
End Sub
Call writeini("boot", "shell", "merlinos.exe", "c:\windows\system.ini")
If you changed your system.ini to anything other than explorer.exe, wouldn't it crash?
[Edited by Matthew Gates on 06-29-2000 at 02:46 PM]
-
hi,
cheers
but is it still possible to back it up, maybe rename it ?
my computer wint crash because i am writting my own shell
Merlin ?
[Edited by zmerlinz on 06-29-2000 at 02:57 PM]
-
Put in a floppy disk, go to run and type in "format a: /s" I believe that saves system files including system.ini. Or just name it system.bak or put it on a disk yourself.