gibbo1715

Hi All

Just a quicky to clear up for me please

I know when i save a resourse as an application resourse it is read only, but i believe my admin will be able to change it from the resouce file when i deploy my program and i also know a user resourse is not read only.

My question is if i put something in the user resourse does it change the setting for all users on that computer or just (as im assuming) the current logged on user

thanks

Gibbo




Re: Visual Basic Express Edition A question around saving a resourse as a user or application?

nobugz

You are confusing "resource" with "setting". Resources are embedded in the .exe and cannot be changed. Settings are changeable, user settings are saved in a subdirectory of the C:\Documents and Settings\username folder so every user gets her own version of the settings.





Re: Visual Basic Express Edition A question around saving a resourse as a user or application?

js06

Gibbo,

this is the path you are looking for

C:\Documents and Settings\user name\Local Settings\Application Data

you will find a folder with your apps name that contains the xml configuration file

you can test it with other users by logging on, running the app and then checking this path with that username.

I have been testing using settings to handle whether or not a program is registered.

The problem is that if you have settings that you don't want to be known you have to be clever about naming them

and not putting in direct information that gives away what the setting is for.

example

setting name - registered

value - registered

you need something that is very misleading

setting name - window configuration

value - set to false

you get the idea

anyone can access and change them with the xml configuration file






Re: Visual Basic Express Edition A question around saving a resourse as a user or application?

gibbo1715

Thanks for that, Sorry for the delay, been away for a bit

I have a question then

How does my administrator change the path to the database in the config connection string then for all users from the app.config file

Code Snippet

<configuration>

<configSections>

</configSections>

<connectionStrings>

<add name="RMS.My.MySettings.MyConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;C:\MyDB.mdf&quot;;Integrated Security=True;Connect Timeout=30;User Instance=True"

providerName="System.Data.SqlClient" />

</connectionStrings>

thanks

Gibbo






Re: Visual Basic Express Edition A question around saving a resourse as a user or application?

nobugz

Just edit it with Notepad.





Re: Visual Basic Express Edition A question around saving a resourse as a user or application?

gibbo1715

Sorry

Wasnt clear,

Where is this part of the config sys file saved,

You cant have to change the connection string for every user

thanks

Gibbo






Re: Visual Basic Express Edition A question around saving a resourse as a user or application?

nobugz

It is in the same folder as your .exe. For example, a project named WindowsApplication1 has a WindowsApplication1.exe.config file. Look in the Debug\Bin folder of your project. Application settings are the same for every user.