AW: AW: Writing to Win programm files dir?

Tiemo Hollmann TB toolbook at kestner.de
Fri Jun 29 11:55:54 EDT 2007


Sorry Ken for not searching deep enough, before posting. Great and helpful
work! I WILL bookmark your post immediately :)
Tiemo

-----Ursprüngliche Nachricht-----
Von: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] Im Auftrag von Ken Ray
Gesendet: Freitag, 29. Juni 2007 17:45
An: How to use Revolution
Betreff: Re: AW: Writing to Win programm files dir?

On Fri, 29 Jun 2007 16:26:06 +0200, Tiemo Hollmann TB wrote:

> Hi Scott, ok, that's what I thought. And what do you do if the user can
save
> data in your app / stack? Do you separate the app without saving feature,
> written to program files and other stacks with saving, writing to app
data?
> Tiemo

Guys, this has all been covered already... :-)

Here's the basic problem for Vista:

  Tip: "Vista 'Gotchas' You Should Know About"
  http://www.sonsothunder.com/devres/revolution/tips/env007.htm

And the suggested approach has been in emails to the list (which I'm 
going to turn into another tip so I don't have to hunt it down each 
time):

----
Best would be to create your program with just a "stub" (also 
called "splash") executable (that all it does is launch and open 
another stack file on disk. This way, you can install your stub program 
in the Program Files folder, the rest of the running stack(s) that make 
up your program in the user's Application Data folder, and then save 
any data that the user generates into the user's Documents folder. 

What that translates to on XP and Vista is:

1) Main Executable Stub 
	Install Location:  specialFolderPath(38)
		Windows XP - C:\Program Files
		Windows Vista - C:\Program Files

2) Additional Program Stacks
	Install Location:  specialFolderPath(26)
		Windows XP - C:\Documents and Settings\Ken\Application Data
		Windows Vista - C:\Users\Ken\AppData\Roaming

3) Generated User Documents
	Install Location:  specialFolderPath(5)  [another form is 
specialFolderPath("documents")]
		Windows XP - C:\Documents and Settings\Ken\My Documents
		Windows Vista - C:\Users\Ken\Documents

If you don't already have this page bookmarked, I would suggest it:

	Tip file010: 'specialFolderPath' Codes
	http://www.sonsothunder.com/devres/revolution/tips/file010.htm

----

> Where would you put a file that the app itself needs to update, 
> regardless of which user is running it? I've been putting that file 
> into an "all users/application data/myapp/" folder but if there are 
> permissions problems with that, what then?

Well, there's the rub - there isn't a simple answer. The problem is 
that for truly "locked down" users, the application itself would need 
to elevate its permissions to take actions that the currently logged-in 
user's permissions do not allow. OS X we can do with "sudo" and get 
authorization; Trevor just found a way to ask for authorization under 
Vista, but for other Windows flavors there isn't a solution for 
Revolution that's been made known.

What I've ended up needing to do is to request that Windows users get 
added to the "Power Users" group, which gives them some form of 
elevated access, but doesn't quite make them "Administrators". However 
some companies won't even allow that...

----

So the bottom line is that until we have an "All Users" solution in 
place for all platforms, best is to either install for a single user or 
to get someone with Admin privileges to install for All Users (they may 
have to authenticate or acknowlege a security dialog in Vista if the 
User Account Control is turned on).

HTH,

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list