Win7

linum

Active Member
Licensed User
Hello. I had a question regarding Windows 7. I have an app that at start up checks to see if a .bmp files exists and if it's found it will delete it. The problem I'm having under Win7 is that the program crashes when it tries to delete the .bmp file. Another one of my programs checks to see if a folder exists at start up and if it doesn't it creates it; well, under Win7 it wont crash my app but it won't create the folder. Both those apps are installed under the Program Files folder.

Is this a genuine concern with Win7 or is there something specific to my Win7 computer I have to fix? Any body else encountered this behavior? What did you have to do to get around this?


Thanks...
 

agraham

Expert
Licensed User
Longtime User
Both those apps are installed under the Program Files folder.
My guess is that you went from XP to Win 7 without having Vista. This is due to the enhanced security in Vista/Win7. You should avoid using the Program Files and ProgramData folders. You can write to them if your app is running as Administrator but it is better to leave them alone. You will get the same problem if you try to run the Samples from the Samples folder in Program Files. I think Erel will relocate the samples in the next version because of this.
 

linum

Active Member
Licensed User
That's exactly what I did; I went from XP to 7 (never really cared for Vista - I skipped it completely). Ok, so I should just have my app install in a different DIR that's not Program Files. I wonder where else I could install it?


Thanks...
 

agraham

Expert
Licensed User
Longtime User
You can install it in Program Files, just don't try to write to it. You can probably make a folder in ProgramData (if it's still called that in Windows 7) and use that for storage as that is what it is intended for. Though I have had some diifficulty sharing data written to ProgramData folders by an application running as Administrator and read by a non-Administrator application. If the data is just for your application to access then putting it in ProgramData will probably work.
 

linum

Active Member
Licensed User
Thank you. I'll modify my app to do just that and I'll see if it gives me anymore hiccups.
 
Top