Solved

Windows 7 File creation issue

Posted on 2014-07-23
3
304 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 34

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

717 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