Source language: Translate to:

RegistryWrite and "restricted" users

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

RegistryWrite and "restricted" users

Postby Trainman » Thu Jun 22, 2006 11:26 am

Hi,

As I understand it, most apps write to "HKEY_CURRENT_USERS" Is that correct? I'm assuming that's be the safest/best place to write some basic settings for my app.

That brings me to my next question: What if the Windows user is on a restricted login? Does that mean my RegistryWrite will fail?

Lastly, is there such thing as a "gauranteed" (or "mostly gauranteed") place to write to the registry?

Many thanks,
John B.
Trainman
 
Posts: 113
Joined: Fri Apr 01, 2005 10:21 am
Location: England

Postby edunaway » Thu Jun 22, 2006 1:03 pm

Not necessarily. If the app installs itself so that it is available to every user then it may write its settings to HKEY_LOCAL_MACHINE. Keep in mind, however, that if your app is installed on a network, the group policy might prohibit most if not all registry writes.

If you want to be 100% safe you could write your app's settings to a text file or a database and store that file in the pub's directory.

-eric
edunaway
 
Posts: 88
Joined: Wed May 04, 2005 9:17 am

Postby Trainman » Thu Jun 22, 2006 1:16 pm

Thanks Eric! Maybe I should've given a little more detail.

My app won't be installed--just a one-file executable. So, the users could have it on their desktops, in any folder, etc.

If you want to be 100% safe you could write your app's settings to a text file or a database and store that file in the pub's directory.


That's a good idea. I'd prefer to write to the registry for security and simplicity, but if I can't, then I think I will try to work out writing to a hidden data file somewhere, but where I don't know yet. (somewhere that won't be restricted on a "restricted" login) :-/

John
Trainman
 
Posts: 113
Joined: Fri Apr 01, 2005 10:21 am
Location: England

Postby edunaway » Thu Jun 22, 2006 2:32 pm

In that case maybe you could use that user's folder:

c:\Documents and Settings\UserName\Application Data\YOURAPPFOLDER

or

c:\Documents and Settings\UserName\Local Settings\Temp\YOURAPPFOLDER

This would keep the extra files hidden without the need to worry about write permissions.

-eric
edunaway
 
Posts: 88
Joined: Wed May 04, 2005 9:17 am

Postby Trainman » Thu Jun 22, 2006 7:00 pm

Thanks Eric!

That's invaluable information! I thought there might be some folder locations like that, but didn't even know where to start guessing what/where they might be. This is great info, many many thanks!

John :-)
Trainman
 
Posts: 113
Joined: Fri Apr 01, 2005 10:21 am
Location: England

Postby Wrangler » Fri Jun 23, 2006 7:09 am

For added security, you could also encrypt the file using Ronnie's rtFilesystemManagement plug:

http://ronmarie.com/neobook.html

This is a great plugin, and belongs in every neobooker toolbox. Al Meyer has a tmStorage plugin you could securely store it in, but it's not listed on his web site. Probably if you email Al, he would send it to you.

http://www.techmediasoftware.com/
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest