From: jpBless on
I have a VB6 program that reads application settings from INI file... until
now most users used the app on Win XP and there is big hassle running the
program on Vista as Program File under Vista is Read Only... Under Vista
users manually copies the INI file to Writeable directory like Documents;
edit the INI file and then copy it back to Program Files thus rendering
changing application settings through the VB app impossible.

I would like to change program settings from INI to say egistry. But I don't
know how to to go about this. Can VB6 create registry keys for an app during
installation? I would like to create the keys for XP/Vista/Win7

I would appreciate any pointers... Thanks in advance for helping.


From: Nobody on
"jpBless" <jp3blessNoSpam(a)hotmail.com> wrote in message
news:u4WBcwnsKHA.6004(a)TK2MSFTNGP04.phx.gbl...
>I have a VB6 program that reads application settings from INI file... until
>now most users used the app on Win XP and there is big hassle running the
>program on Vista as Program File under Vista is Read Only... Under Vista
>users manually copies the INI file to Writeable directory like Documents;
>edit the INI file and then copy it back to Program Files thus rendering
>changing application settings through the VB app impossible.
>
> I would like to change program settings from INI to say egistry. But I
> don't know how to to go about this. Can VB6 create registry keys for an
> app during installation? I would like to create the keys for XP/Vista/Win7
>
> I would appreciate any pointers... Thanks in advance for helping.

Search the newsgroups for "vb CSIDL_APPDATA" or "vb CSIDL_COMMON_APPDATA".


From: mayayana on
You can save the INI files to each user's
App Data folder for individual settings.
For per-machine settings you can create
a folder under all users app data, set permissions
on it, and save settings there.

You can also use SaveSetting
and GetSetting, which is a very easy way
to save per-user settings in the Registry
under the VB key.

You can create a key under HKLM if you
want per-machine settings, but you'd need
to set permissions on that key in order for
people to be able to write to it.

I do something similar to you, but for Vista+
I changed it. I now create a folder named
Settings in the program folder during setup,
and I set that folder with permission for all.
That way I can stay inside the program folder
without affecting security because the
permissions are changed only on my own
subfolder, which contains only the settings files.

Some people consider that approach to be "wrong"
as it's not in line with Microsoft's recommendations,
but Microsoft has made it difficult to save per-machine
settings. Personally I prefer not to be putting things
in such an obscure location as all users app data, where
nobody can find them. And per user app data is even
worse, with several folders for each person. (There
are something like 6 possible TEMP folder paths for
each user on XP+. I had to write a long script just to
perform the job of deleting TEMP files!) With the differing
folder structures on different systems, the numerous
user folders, and the problems of file virtualization, I
prefer to just keep it all clean, inside my own folders.



> I have a VB6 program that reads application settings from INI file...
until
> now most users used the app on Win XP and there is big hassle running the
> program on Vista as Program File under Vista is Read Only... Under Vista
> users manually copies the INI file to Writeable directory like Documents;
> edit the INI file and then copy it back to Program Files thus rendering
> changing application settings through the VB app impossible.
>
> I would like to change program settings from INI to say egistry. But I
don't
> know how to to go about this. Can VB6 create registry keys for an app
during
> installation? I would like to create the keys for XP/Vista/Win7
>
> I would appreciate any pointers... Thanks in advance for helping.
>
>


From: jpBless on
Wow very interesting. I am looking at the options you suggested. I
appreciate your help.


"mayayana" <mayayana(a)nospam.invalid> wrote in message
news:OATcnbrsKHA.4752(a)TK2MSFTNGP04.phx.gbl...
> You can save the INI files to each user's
> App Data folder for individual settings.
> For per-machine settings you can create
> a folder under all users app data, set permissions
> on it, and save settings there.
>
> You can also use SaveSetting
> and GetSetting, which is a very easy way
> to save per-user settings in the Registry
> under the VB key.
>
> You can create a key under HKLM if you
> want per-machine settings, but you'd need
> to set permissions on that key in order for
> people to be able to write to it.
>
> I do something similar to you, but for Vista+
> I changed it. I now create a folder named
> Settings in the program folder during setup,
> and I set that folder with permission for all.
> That way I can stay inside the program folder
> without affecting security because the
> permissions are changed only on my own
> subfolder, which contains only the settings files.
>
> Some people consider that approach to be "wrong"
> as it's not in line with Microsoft's recommendations,
> but Microsoft has made it difficult to save per-machine
> settings. Personally I prefer not to be putting things
> in such an obscure location as all users app data, where
> nobody can find them. And per user app data is even
> worse, with several folders for each person. (There
> are something like 6 possible TEMP folder paths for
> each user on XP+. I had to write a long script just to
> perform the job of deleting TEMP files!) With the differing
> folder structures on different systems, the numerous
> user folders, and the problems of file virtualization, I
> prefer to just keep it all clean, inside my own folders.
>
>
>
>> I have a VB6 program that reads application settings from INI file...
> until
>> now most users used the app on Win XP and there is big hassle running the
>> program on Vista as Program File under Vista is Read Only... Under Vista
>> users manually copies the INI file to Writeable directory like Documents;
>> edit the INI file and then copy it back to Program Files thus rendering
>> changing application settings through the VB app impossible.
>>
>> I would like to change program settings from INI to say egistry. But I
> don't
>> know how to to go about this. Can VB6 create registry keys for an app
> during
>> installation? I would like to create the keys for XP/Vista/Win7
>>
>> I would appreciate any pointers... Thanks in advance for helping.
>>
>>
>
>


From: jpBless on
Thanks for the pointers. I apprciate your help.

"Nobody" <nobody(a)nobody.com> wrote in message
news:uCrB2upsKHA.732(a)TK2MSFTNGP06.phx.gbl...
> "jpBless" <jp3blessNoSpam(a)hotmail.com> wrote in message
> news:u4WBcwnsKHA.6004(a)TK2MSFTNGP04.phx.gbl...
>>I have a VB6 program that reads application settings from INI file...
>>until now most users used the app on Win XP and there is big hassle
>>running the program on Vista as Program File under Vista is Read Only...
>>Under Vista users manually copies the INI file to Writeable directory like
>>Documents; edit the INI file and then copy it back to Program Files thus
>>rendering changing application settings through the VB app impossible.
>>
>> I would like to change program settings from INI to say egistry. But I
>> don't know how to to go about this. Can VB6 create registry keys for an
>> app during installation? I would like to create the keys for
>> XP/Vista/Win7
>>
>> I would appreciate any pointers... Thanks in advance for helping.
>
> Search the newsgroups for "vb CSIDL_APPDATA" or "vb CSIDL_COMMON_APPDATA".
>
>