Sample C++ code for Vista
Wanted: Sample C++ code for Vista
Objective: To get an existing program that works in Windows XP to work equally well under Vista. The user should be able to operate at ordinary levels of security and not as administrator.
Background: This is a C++ program which requires the ability to read and write files and, at least on the first run, to create a subdirectory.
Problems:
(1) The Program Files area is effectively "Read only" under Vista.
(2) Microsoft indicates that "virtualization" -- in which files supposedly written to the Program Files area are written elsewhere -- will be available only for an interim period. I want a permanent solution.
(3) Current attempts to make a directory and to write files elsewhere fail.
Requests:
(1) Sample program manifest lines and/or a sample program manifest to support the next two items.
(2) A worked example of C++ code that creates a subdirectory in a Windows Vista environment. [ _mkdir() works fine under Windows XP.]
(3) A worked example of C++ code that successfully opens a file and writes to that file, again under Vista.
Re: Sample C++ code for Vista
You should have no problems creating a subdirectory under the current users private directory tree. Anything else requires elevated privs.
Can you post some code that does not seem to work for you.
Re: Sample C++ code for Vista
I've opened files for reading and writing with no problems, but I never tried to do it in special folders like Program Files. In "normal" directories it should be everything as usual.