views:

229

answers:

2

For years Windows XP (32 bit)was my development desktop (personal projects). I develop many hobby projects and distribute it as open source and have never worried or bothered about checking it in Vista (I have used Vista only for a week). But none of my users have complained much about my apps in Vista.

Now I have moved to Windows 7 64 Bit OS (RTM). I am using Visual Studio 2008. I am developing an application which I am planing to sell.

I am using SQLite DB for data storage and everything went well until I decided to instal my first version in my laptop. Boom! app did not work as expected. I found that even though I was an admin user the app was not able to write to the DB (it said readonly).

Note: In windows 7 even if the logged in user has admin privileges, it prompts for confirmation if a process (sometimes even copy paste between drives) requires admin access. Not sure if this is new. Ignore if this is something old.

When I ran the app as "run as Administrator" it worked fine.

The app.manifest file has the following setting.

<requestedExecutionLevel level="asInvoker" uiAccess="false" />

I understand I can change it to either of the following

<requestedExecutionLevel  level="asInvoker" uiAccess="false" />
<requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel  level="highestAvailable" uiAccess="false" />

My question is if I change the setting to "requireAdministrator" will it affect normal users who dont have admin previleages?

How can I make my DB writable for a normal user?

How will this setting affect Windows XP users?

What is the best configuration which will let everyone update the DB without any issues?

This is the first time I am facing such an issue with security. Any advises?

Note: I will be testing this app in every possible OS. I ran a test in Vista 32 bit os (admin user) and it worked fine. But my experience with Windows 7 confused me.

A: 

Your best bet is to install virtual machines with you're target OS's installed. You never really know what will happen until you test.

Byron Whitlock
yes tested the app with a friend's vista 32 bit os and it worked fine. but my experience with Windows 7 confused me.
Shoban
+3  A: 
  1. Yes, normal users will have to supply administrator credentials.
  2. Install your DB to a user writeable location or use a service / IPC to write to the DB for you.
  3. Per-user database if possible. You can store the per-user stuff in user writable locations like AppData. If not, then using service/IPC to do the writes for you.
Skrymsli