From: Bob S on 18 Mar 2010 11:41
Thank you. That did it.
I accidentally resubmitted the question, sorry about that.
Robert E. Styma
Principal Engineer (DMTS)
> Did you look in the win.ini file?
> I used the following declaration:
> Private Declare Function WritePrivateProfileString Lib "kernel32" _
> Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, _
> ByVal lpKeyName As String, ByVal lpString As String, _
> ByVal lpFileName As String) As Integer
> This allowed me to specify an explicit file name of the INI file where I
> the setting to be stroed. To specify a location to store them I used the
> I just added the filespec & .ini extension to it. Doing some research I see
> VB 2008 and possibly previous .NET versions use the Configuration item
> to store persistant parameters, but I chose to use the old INI text file
> because tech support likes going into users' PCs and making changes to the
> settings. Regards, Saga
> "Bob S" <BobS(a)discussions.microsoft.com> wrote in message
> >I have been working with a vb program which I converted to vb.net using
> > Visual Studio 2008. I have been using GetProfileString and
> > WriteProfileString to save settings between runs of the program. In one
> > case
> > I want to be able to get rid of some settings. In one posting if was
> > suggested that
> > WriteProfileString(Appname, KeyName, 0&)
> > using the declare:
> > Declare Function WriteProfileStringA% Lib "Kernel32" (ByVal lpAppName$,
> > ByVal lpKeyName$, ByVal lpString$)
> > would do the trick. To check that this is what is actually happening, I
> > wanted to look at the data before and after. In the old days, the data
> > was
> > stored in .ini files. More recent articles mention that the data is
> > stored
> > in the registry. I have been searching the registry and various files
> > looking for the place the data actually gets stored.
> > Can someone point me to the correct place to look?
> > Also if there is a preferred .NET way of reading and writing the profile,
> > suggestions are welcome.
> > Thank you for your time
> > --
> > Robert E. Styma
> > Principal Engineer (DMTS)
> > Alcatel-Lucent, Phoenix