Vista/Win7 priveleges

Jim Bufalini jim at visitrieve.com
Fri Jan 22 13:54:19 EST 2010


Jacque wrote:
 
> I use Install Creator to make Windows installers. There is this warning
> in the docs:
> 
> "Note about Vista: on Vista you shouldn't run your program from the
> installer, as it will be executed with administrator privileges. For
> example any file created with your program in administrator mode won't
> be overridable the next time your application will be executed, unless
> it is run as administrator."
> 
> How limiting is this to the average user? I know Vista/Win7 enforce a
> sort of super-admin mode and I think this is what installers use. Does
> this mean that any documents created after an auto-launch will not be
> accessible at all when the program next runs as a standard user? Even
> if
> they are logged in as admin? Or if not, what limitations would be
> enforced? I'm not clear on what "overridable" means here.

I suspect this to be a typo for "over-writable?" ;-)

Quite honestly, I've never heard of such a thing. 

First, it is true that in Vista/7 programs inherit permissions. So, if your
installer is running at highest permissions (which it has to) then, if it
launches another program, that launched program automatically inherits the
permissions of the installer (for that launch only).

That said, I always have a checkbox that is, by default, checked for running
a program after the installer quits. I have never had a problem with
permissions on ensuing launches of the program with files created by that
initial launch of the program. And, for example, the initial launch will do
things like create SQLite DB files, which must be accessed and modified by
the program on ensuing launches, create new registry entries that get
updated later, and other things.

So, I think you can safely ignore this "warning" unless on initial launch
your program writes something to, for example, the System32 directory and
then wants to totally overwrite that file later. 

Your bigger issue with Vista/7 is that on first launch, Vista is going to
put up a dialog asking permission from the user to allow the new EXE to run
and will block actual execution of the program until the user clicks
"Allow." You need to account for this delay, especially if there are any
time-sensitive actions your program is going to take on first launch, like
accessing the Internet.

Aloha from Hawaii,

Jim Bufalini






More information about the use-livecode mailing list