|
-
Jun 29th, 2000, 01:32 AM
#1
Thread Starter
Fanatic Member
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 ?
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Jun 29th, 2000, 01:44 AM
#2
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]
-
Jun 29th, 2000, 01:51 AM
#3
Thread Starter
Fanatic Member
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]
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
[ Galahtech.com] | [ My Site] | [ Fishsponge] | [ UnixForum.co.uk]
-
Jun 29th, 2000, 08:12 AM
#4
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|