Solved

Windows 7 File creation issue

Posted on 2014-07-23
3
293 Views
Last Modified: 2014-07-24
I am developing an application suite and one of the programs is started by the installer, which also places it in the start-up folder. When this application is started for the first time (by the installer) it discovers it does not have a configuration file and creates it. The problem is that the file permissions given to this configuration file prevent other applications in the suite being able to write to it.

If I delete the configuration file and restart the PC then when the application starts up it recreates the configuration file and permissions are good.

What is the best way to resolve this problem. I do not want to disable the auto-run of the application by the installer as this would mean the user would either need to start it manually for the first time or ask for a PC restart.
Sid.
0
Comment
Question by:Sid Price
3 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 40216085
Would this achieve what you want.
Create another small app which the installer will start.  The only job of this app would be to launch your 'real' app.  You 'real' app then deletes this stub app if it detects it.
0
 
LVL 33

Accepted Solution

by:
sarabande earned 500 total points
ID: 40216316
if the installer would run 'as administrator' in the user account, file permissions should be ok.

if that isn't an option you may store the default configuration file in the application folder read-only and copy the file to user folder at first start.

Sara
0
 

Author Comment

by:Sid Price
ID: 40217385
sarabande, I was considering your idea of including a default file with the distribution, It may be the simplest solution, the only thing one would need to ensure is that uninstall (to make updates) should not remove this file because then the user would loose the current settings.
Thank you for helping my decision,
Sid.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question