ANN: Vista "Gotchas" You Should Know About

2007-02-22 Thread Ken Ray
Hey everyone - I've been working with the release of Vista (Home 
Premium Edition) since its release and just discovered something you 
may or may not be aware of that you REALLY need to be aware of IF:

  - You install your program to the Program Files folder
  - You leave the User Account Control turned on (as it shipped)
  - You have one or more files you need to write data back to (like an 
.ini or .cfg file, or even a Rev or MC stack that you change data in 
and save) that is in the same folder as your program (or a subfolder)

Windows Vista, in attempting to be as secure as possible, and in an 
attempt to support "legacy" applications that have .INI files in the 
same location as the program, when it detects that you are attempting 
to write back to a file in a protected area (like Program Files), will 
instead write the changed data to a NEW location called the 
"VirtualStore", and from that point on, will always READ AND WRITE to 
the file in the VirtualStore. 

So for example, suppose you installed your app as a stub Rev 
standalone, with a main stack file that is read, can be changed, and 
resaved. So your initial installation would put it here:

  C:\Program Files\YourApp\YourApp.exe
  C:\Program Files\YourApp\main.rev

Installation goes fine, and you launch 'YourApp.exe', which in turn 
opens 'main.rev' - you enter some data into a field on the main stack 
and click a button which saves 'main.rev' back to the hard drive. What 
really happens is this:

  1) Vista recognizes you're attempting to write the 'main.rev' file 
back to a protected area (Program Files)
  2) Vista creates a folder at in the VirtualStore and writes the 
updated 'main.rev' stack to this path (assumes a user name of "Ken"):

   C:\Users\Ken\AppData\Local\VirtualStore\Program 
Files\YourApp\main.rev

This is called "virtualizing" the file. You then quit YourApp, and 
relaunch it. YourApp launches, and then goes to open 'main.rev'. Here's 
what REALLY happens:

  1) Vista recognizes that you're attempting to open a file that it has 
"virtualized" into the VirtualStore
  2) Instead of opening the file from C:\Program Files\YourApp, it 
instead opens the 'main.rev' that is in the VirtualStore.
  3) If you make changes to the stack, it saves it back to the 
VirtualStore.

This doesn't sound TOO bad, but here's where the 'gotchas' come in:

  GOTCHA #1: If you leave Account Control on, but decide at some point 
you want to start over from scratch or uninstall and reinstall (perhaps 
an upgrade), if you replace your app in C:\Program Files\YourApp with a 
new version (even one that has been upgraded or has significant 
changes), the next time the app is launched it will open up the 
'main.rev' from the VirtualStore and the user will not only NOT see a 
brand new app, but it will appear as if any upgrades that had been made 
are gone. 
  SOLUTION: To truly uninstall, you need to make sure you delete your 
app from the VirtualStore as well. 

  GOTCHA #2: If you have opened a stack file from the VirtualStore as a 
result of attempting to open it from a protected folder (like Program 
Files), if you ask for 'the filename of this stack', it will NOT give 
you the path to the VirtualStore version of the stack, but will instead 
return the path to the original location in Program Files. So there is 
not (AFAIK) any way for a stack that is open to know if it has been 
virtualized or not. 
  SOLUTION: None that I know of.

  GOTCHA #3: If the user turns off User Account Control, the next time 
YourApp is launched, it will NOT get the file from the VirtualStore, 
and will instead open the file from Program Files. It will appear like 
all the data that had been entered is deleted (resulting in frightened 
calls to Tech Support). 
  SOLUTION: In this instance, the "old" file still remains in the 
VirtualStore, so it can be moved back into Program Files to restore the 
data.

Note that if you turn off User Account Control at the get-go, you 
experience none of these problems - but this is (a) not recommended by 
Microsoft, and (b) something that must be manually done since Vista 
ships with it turned on by default. And I'm sure IT departments won't 
be happy if you request that they turn it off so your program can work 
right... :-)

I'm sure there are more gotchas in Vista, but this was a major one that 
I thought the community should know about.

Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: ANN: Vista "Gotchas" You Should Know About

2007-02-22 Thread Richard Gaskin

Thanks for that, Ken.

One more note:  Don't think you can save money getting Home Basic 
Edition -- it doesn't have Aero, so there's a lot of UI appearances you 
won't be able to check.


For that an other Vista annoyances:



--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: ANN: Vista "Gotchas" You Should Know About

2007-02-23 Thread Tariel Gogoberidze


On Feb 23, 2007, at 1:12 PM, Ken Ray <[EMAIL PROTECTED]> wrote:


Hey everyone - I've been working with the release of Vista (Home
Premium Edition) since its release and just discovered something you
may or may not be aware of that you REALLY need to be aware of IF:


Ken, thanks for this info. Any solutions so far?
I don't have Vista installed yet to look, may be you know if there is 
some "designated" SpecialFolderPath accessible folder on Vista for 
files / stacks that you need to write back without triggering 
"VirtualStore",  even if "Account Control" is turned "On" ?


Also, got the message from Klaus from [EMAIL PROTECTED]

On Feb 23, 2007, at 7:52 AM, [EMAIL PROTECTED] wrote:


Hi friends,

version 2.7 of the Rev engine has been out for a long time now.
Ther are several new features that are not yet reflected in the current
MC IDE like new crossplatform inks, antialiased of graphics etc... and
what might the new version 2.9 might bring us!
So I would like to add these things to the MC IDE (if I ever find the
time) in the future.

But that means that future versions of the IDE might REQUIRE an engine
= 2.7 OR a LOT of more work to make the IDE compatible also with
earlier
versions.

I'd like to hear you opinions about this.
Best
Klaus Major



May be we can discus it here as well?
Personally I'm fine if future versions of IDE would REQUIRE an engine 
2.7 +
We can keep older version of MC IDE compatible with earlier engines  in 
archives and whoever wants it would be able to grab it from there.


best regards
Tariel

___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: ANN: Vista "Gotchas" You Should Know About

2007-02-23 Thread Ken Ray
On Fri, 23 Feb 2007 19:52:59 -0500, Tariel Gogoberidze wrote:

> 
> On Feb 23, 2007, at 1:12 PM, Ken Ray <[EMAIL PROTECTED]> wrote:
> 
>> Hey everyone - I've been working with the release of Vista (Home
>> Premium Edition) since its release and just discovered something you
>> may or may not be aware of that you REALLY need to be aware of IF:
> 
> Ken, thanks for this info. Any solutions so far?
> I don't have Vista installed yet to look, may be you know if there is 
> some "designated" SpecialFolderPath accessible folder on Vista for 
> files / stacks that you need to write back without triggering 
> "VirtualStore",  even if "Account Control" is turned "On" ?

Well, so far what's been suggested so far is either:

CSIDL_COMMON_DOCUMENTS  (specialFolderPath(46))
C:/Users/Public/Documents

or

CSIDL_PERSONAL  (specialFolderPath(5))
C:/Users/Ken/Documents

depending on whether you want it available to everyone on the machine, 
or just the logged-in user. This is a visible place that normal users 
can get to if they need to (perhaps to toss out a preference file to 
start the app up with defaults). If you don't want people to be able to 
get to it easily, but still have it be a writeable area, you can use 
either:

CSIDL_COMMON_APPDATA  (specialFolderPath(35))
C:/ProgramData

or 

CSIDL_LOCAL_APPDATA  (specialFolderPath(28))
C:/Users/Ken/AppData/Local

once again depending on whether you want it for everyone or just the 
logged in user. These folders are writeable, but are kept hidden, so 
only people "in the know" will be able to get to files in those folders.

Ken
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: ANN: Vista "Gotchas" You Should Know About

2007-02-23 Thread J. Landman Gay

Ken Ray wrote:

On Fri, 23 Feb 2007 19:52:59 -0500, Tariel Gogoberidze wrote:


On Feb 23, 2007, at 1:12 PM, Ken Ray <[EMAIL PROTECTED]> wrote:


Hey everyone - I've been working with the release of Vista (Home
Premium Edition) since its release and just discovered something you
may or may not be aware of that you REALLY need to be aware of IF:

Ken, thanks for this info. Any solutions so far?
I don't have Vista installed yet to look, may be you know if there is 
some "designated" SpecialFolderPath accessible folder on Vista for 
files / stacks that you need to write back without triggering 
"VirtualStore",  even if "Account Control" is turned "On" ?


Well, so far what's been suggested so far is either:

CSIDL_COMMON_DOCUMENTS  (specialFolderPath(46))
C:/Users/Public/Documents

or

CSIDL_PERSONAL  (specialFolderPath(5))
C:/Users/Ken/Documents

depending on whether you want it available to everyone on the machine, 
or just the logged-in user. This is a visible place that normal users 
can get to if they need to (perhaps to toss out a preference file to 
start the app up with defaults). If you don't want people to be able to 
get to it easily, but still have it be a writeable area, you can use 
either:


CSIDL_COMMON_APPDATA  (specialFolderPath(35))
C:/ProgramData

or 


CSIDL_LOCAL_APPDATA  (specialFolderPath(28))
C:/Users/Ken/AppData/Local

once again depending on whether you want it for everyone or just the 
logged in user. These folders are writeable, but are kept hidden, so 
only people "in the know" will be able to get to files in those folders.


Some of the info I found suggested these last two were only writable at 
installation, and after that were read-only. Is that true? One would 
think the AppData folders would be the natural place to put files, but 
someone was commenting they had to use Documents because AppData 
couldn't be written to.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: ANN: Vista "Gotchas" You Should Know About

2007-02-24 Thread Ken Ray
On Fri, 23 Feb 2007 22:40:43 -0600, J. Landman Gay wrote:

> Some of the info I found suggested these last two were only writable 
> at installation, and after that were read-only. Is that true? One 
> would think the AppData folders would be the natural place to put 
> files, but someone was commenting they had to use Documents because 
> AppData couldn't be written to.

Well, here's the official word from Microsoft from their page 
"Developer Best Practices and Guidelines for Applications in a Least 
Privileged Environment" 
(http://msdn2.microsoft.com/en-us/library/aa480150.aspx) :

"Applications should be installed in the \Programs files\ directory. 
Per-user configuration information should be stored in the 
\Users\(username)\AppData directory. User data, templates, and 
application-created files all have proper locations in the 
\Users\(username) subdirectories. Although this was not enforced in the 
past, since many users would run programs with full administrative 
privileges, applications that do not place information in the correct 
location are likely to fail. This is especially true when 
Virtualization is turned off."

This is #3 in the section "Designing Applications for Windows Vista" - 
it's worthy of a good read.




Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: ANN: Vista "Gotchas" You Should Know About

2007-02-24 Thread J. Landman Gay

Ken Ray wrote:

> Well, here's the official word from Microsoft from their page
> "Developer Best Practices and Guidelines for Applications in a Least
> Privileged Environment"
> (http://msdn2.microsoft.com/en-us/library/aa480150.aspx) :
>
> "Applications should be installed in the \Programs files\ directory.
> Per-user configuration information should be stored in the
> \Users\(username)\AppData directory. User data, templates, and
> application-created files all have proper locations in the
> \Users\(username) subdirectories. Although this was not enforced in the
> past, since many users would run programs with full administrative
> privileges, applications that do not place information in the correct
> location are likely to fail. This is especially true when
> Virtualization is turned off."
>
> This is #3 in the section "Designing Applications for Windows Vista" -
> it's worthy of a good read.

Thanks very much for this, very helpful and just what I was looking for. 
For my apps, this is the relevant piece:


> # Write per-user data to the user profile (%APPDATA%).
> # Write per-machine data to users\all users\application data\... 
(%ALLUSERSPROFILE%).


So apparently you're right and we can use AppData. I was especially 
interested in the global user data location (AllUsersProfile). I 
couldn't find that info when I did my search yesterday.


Looks like we are all going to have to update our apps for Vista.


--
Jacqueline Landman Gay | [EMAIL PROTECTED]
HyperActive Software   | http://www.hyperactivesw.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: ANN: Vista "Gotchas" You Should Know About

2007-02-24 Thread Richard Gaskin

J. Landman Gay wrote:

For my apps, this is the relevant piece:

 > # Write per-user data to the user profile (%APPDATA%).
 > # Write per-machine data to users\all users\application data\... 
(%ALLUSERSPROFILE%).


So apparently you're right and we can use AppData.


Just to be clear for us slow-pokes, this works while logged in under a 
non-admin account?


--
 Richard Gaskin
 Fourth World Media Corporation
 ___
 [EMAIL PROTECTED]   http://www.FourthWorld.com
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard


Re: ANN: Vista "Gotchas" You Should Know About

2007-02-24 Thread Ken Ray
On Sat, 24 Feb 2007 13:30:37 -0800, Richard Gaskin wrote:

> J. Landman Gay wrote:
>> For my apps, this is the relevant piece:
>> 
>>  > # Write per-user data to the user profile (%APPDATA%).
>>  > # Write per-machine data to users\all users\application data\... 
>> (%ALLUSERSPROFILE%).
>> 
>> So apparently you're right and we can use AppData.
> 
> Just to be clear for us slow-pokes, this works while logged in under 
> a non-admin account?

Yes, but just keep in mind that if you want your users to be able to 
have easy access to writeable data, that AppData is not the place to 
put it (since that folder is hidden). But for configuration files you 
want to read/write to that the user won't be getting at themselves, 
AppData is the place to put it.

Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
Web Site: http://www.sonsothunder.com/
___
metacard mailing list
metacard@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard