|
-
December 7th, 1999, 07:05 AM
#1
Setup - I need to modify system.ini and force a reboot
I am trying to use the P&D Wizard to produce an install disk set for my application. As part of the install process, I need to add 6 lines to the 386Enh section of system.ini to install a third-party comms driver used by my code and then force/recommend a reboot before my program can be run.
I will be installing to either Win95/98 or WinNT.
I realise I will probably have to modify something in the SETUP1 project.
This is the information I need to add:
[386Enh]
device=C:\commdrv\wcsccdrv.386
WCSCMaxPorts=2
WCSCInBufLen=4096
WCSCOutBufLen=2048
WCSCInBufHigh=4000
WCSCInBufLow=250
Is it possible to place this information in the registry instead?
Thanks for any help...
Mark
Regards
Mark Rivers-Moore
-
December 10th, 1999, 02:50 PM
#2
Re: Setup - I need to modify system.ini and force a reboot
Use the WritePrivateProfileString function.
Public Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyName As Any, ByVal lsString As Any, ByVal lplFilename As String) As Long
Dim ret As Long
lpAppName = "[386Enh]"
lpKeyName = "WCSCMaxPorts"
lpString = "2"
lpFileName = "system.ini"
ret = WritePrivateProfileString(lpAppName, lpKeyName, lpString, lpFileName)
[email protected]
http://vbcode.webhostme.com/
-
December 10th, 1999, 04:48 PM
#3
Re: Setup - I need to modify system.ini and force a reboot
To write to registry use
SaveSetting "AppName", "SectionName", "KeyName", "SettingName"
and to read from registry use
x = GetSetting("AppName", "SectionName", "KeyName", "DefaultValue")
where you can use text1.text = x to display string from registry you have just read
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
|