?
Solved

Windows 7 File creation issue

Posted on 2014-07-23
3
Medium Priority
?
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 35

Accepted Solution

by:
sarabande earned 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

764 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