Click to See Complete Forum and Search --> : Setup - I need to modify system.ini and force a reboot


MarkRM
December 7th, 1999, 06:05 AM
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

smalig
December 10th, 1999, 01:50 PM
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)

smalig@hotmail.com
http://vbcode.webhostme.com/

AndyK
December 10th, 1999, 03:48 PM
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