Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Nov 14, 2019 9:46 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Where to write authentication file for all users on computer
PostPosted: Thu Feb 02, 2012 2:15 pm 
Offline

Joined: Fri Dec 09, 2005 6:25 pm
Posts: 357
Where could I write the authentication text file so that if the admin installs the s/w, that he will not have to register is separately for each user on the Windows computer? Right now I have it writing to:
f = specialFolder.Preferences.child(regFileName)

which puts it in the user's AppData\Roaming folder on Windows 7, but this is only good for that user, right?


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to write authentication file for all users on comp
PostPosted: Thu Feb 02, 2012 2:26 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
Use SpecialFolder.SharedApplicationData, which is the All Users profile under Windows

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to write authentication file for all users on comp
PostPosted: Thu Feb 02, 2012 2:38 pm 
Offline

Joined: Fri Dec 09, 2005 6:25 pm
Posts: 357
Okay, great. Somehow I missed this in the LR. I'll give it a try. Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to write authentication file for all users on comp
PostPosted: Thu Feb 02, 2012 2:40 pm 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
Note that you will need to get admin permissions to write to the location under Win7 (and probably also Vista). Otherwise, you'll get an I/O exception.

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to write authentication file for all users on comp
PostPosted: Thu Feb 02, 2012 2:43 pm 
Offline

Joined: Fri Dec 09, 2005 6:25 pm
Posts: 357
Perhaps I could write it to specialFolder.Preferences if I get an error writing to SharedApplicationData?


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to write authentication file for all users on comp
PostPosted: Thu Feb 02, 2012 3:48 pm 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
Yes, you can write to specialFolder.Preferences, but that's only the single user also.
If you try to write to SpecialFolder.SharedPreferences, which is the universal location, you will encounter the same permissions issues.

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to write authentication file for all users on comp
PostPosted: Thu Feb 02, 2012 4:01 pm 
Offline

Joined: Fri Dec 09, 2005 6:25 pm
Posts: 357
Okay, thanks, classone. At least I know what to do next.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group