Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9189055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:09:33+00:00 2026-06-17T20:09:33+00:00

I created application that store some data to XML file. The issues is with

  • 0

I created application that store some data to XML file. The issues is with the path of the XML saving. Am using TinyXML to save the data in vc++.

When I deploy this application, it installs in "C:\Program files(x86)\applicationname " and when I run the application the XML file is saving in

"C:\Users\UserName\AppData\Local\VirtualStore\Program Files (x86)\ApplicationName ".

I have made this application to work on system startup. So when I restart this application,
the xml file is stored in different path "C:\Users\UserName\AppData\Local\VirtualStore\windows\sysWOW64"

I want my XML to be stored in the path where I installed or should be stored in appdata, application name

What should I do to store XML file in one places where application is installed?

doc.SaveFile( "test.xml" ); // xml saving code in tinyxml library
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:09:34+00:00Added an answer on June 17, 2026 at 8:09 pm

    Firstly, this has nothing to do with C++, as the C++ code is probably working. Same with XML and tinyxml and even visual-c++.

    It seems that windows redirects those write accesses to a user-specific “VirtualStore\Program Files”, but I’ll leave it to you to research the actual semantics of that. On startup, when there is no user, this path obviously differs, since the former user is not logged in.

    Now, in order to get a fixed path, you can use the function GetModuleFileName() to find out the location of your executable and use that path to locate Smartmeter.xml. However, the problem you are facing now is that programs installed under “Program Files” don’t magically gain write access rights to their install directory. This is to protect one user from messing with data of another user.

    I think that what you are doing is writing a program that runs in the background, which would be called a “service” under MS Windows. What is still unclear is what you want to achieve with this file and also what you are planning to do overall, and these are things that decide the future steps. In any case, take a look at the possibilities that services provide, maybe there is something that fits your needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an application that uses settings.settings to store some user specific settings
I created an iPhone application for the App Store. I hear that some things
I have created an application that connect on a web-server and reads an xml
I have created an android application that calls (using kSOAP library) a SOAP based
My application creates pieces of data that, in xml, would look like this: <resource
I created a C# program using SQL Server 2008 Express. There is some data
I'm using core data on an iPhone application. I have multiple persisntent stores that
In my application, I need to store and transmit data that contains many repeating
In my application I want to save some string data into an array. This
Some time back I created a small application that uses SQL CE 4.0 database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.