From: John Smith on
I maintain a couple well-behaved Windows 32 bit program that need to be made more
Vista and 7 compatible. The programs run just fine when set in Windows XP
compatibity mode in Vista and Windows 7 (both 32 and 64 bit versions). Without
the compatibility mode the programs report an error immediately when write access
is required (both programs write every now and then to intermediate files).

Is there a way for a program to set Administrator that mode automatically? Both
programs are run in their own directory, often not in "Program files"
subdirectory but in, say, "c:\myprog".
From: Leslie Milburn on

"John Smith" <do_not_use(a)invalid.address.com> wrote in message
news:vpgap5db3ah5sphksr7mof13len3hnrbmf(a)4ax.com...
>I maintain a couple well-behaved Windows 32 bit program that need to be
>made more
> Vista and 7 compatible. The programs run just fine when set in Windows XP
> compatibity mode in Vista and Windows 7 (both 32 and 64 bit versions).
> Without
> the compatibility mode the programs report an error immediately when write
> access
> is required (both programs write every now and then to intermediate
> files).
>
> Is there a way for a program to set Administrator that mode automatically?
> Both
> programs are run in their own directory, often not in "Program files"
> subdirectory but in, say, "c:\myprog".

You could create a manifest file that then asks the user to run the program
elevated.


From: Random on
On Mar 8, 10:35 am, John Smith <do_not_...(a)invalid.address.com> wrote:
> I maintain a couple well-behaved Windows 32 bit program that need to be made more
> Vista and 7 compatible.

If you really want to make them more Vista/7 compatible, then store
the intermediate files in CSIDL_APPDATA, which was the preferred
approach on XP as well. If you need to have one user write files that
another user can read, then store the data in CSIDL_COMMON_APPDATA and
set the ACLs of the folder at install time to allow all users to write
to the folder.

You could create a manifest for your app as Leslie suggests, but that
would require the user deal with a UAC prompt every time they run the
app. And, at least for this, there's no technical reason to require
elevating your application.