Jump to content

Vista...


Recommended Posts

Hi, ive got a script that uses INI files to store data (i don't like messing with the registry...)

My programs does work fine with XP and the file is created, read and written to without issues.

The program creates the INI-file at @windowsdir (dont really have a good reason, but its easy, acessible and messy anyways :party: )

but if the INI cant be created at @windowsdir it tries @scriptdir which is (if the program is installed properly) "@programfilesdir & \ALIBI\Run"

The @scriptdir works perfectly on XP but on Vista only IF the INI is already created by the user (the program cant create the INI itself).

This seems strange to me, because if you install a program it should be able to modify files within its own install directory, right? (i use "inno setup" to create the setup, great program btw :) )

Is there any workarounds? or shall those who choose a bad OS be punished by the means of not being able to run my applications?

[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Link to comment
Share on other sites

This seems strange to me, because if you install a program it should be able to modify files within its own install directory, right?

No, users shouldn't be able to make changes to the program directory. That's very insecure. That's why every other reasonable operating system in the universe doesn't let end users edit files in the program directory. Even in XP I do most of my dealings as a limited access user and don't have write permissions in program files.

Is there any workarounds? or shall those who choose a bad OS be punished by the means of not being able to run my applications?

You should be punished for writing bad code :) It is slack coding like this that is the true cause of the UAC headaches.

Choices?

For per user settings put them in @AppDataDir

There's also techincally @AppDataCommonDir, but I don't know if limited access users can't write here.

if you MUST edit something in the program directory, add

#RequireAdmin

At the start of the code.

It will trigger UAC and require authentication EVERY TIME. Which is annoying.

Code it right. :party:

EDIT:

If you MUST have common settings for all users, maybe add something to the installer to change permissions on the .ini file straight away to allow all users to modify it. Look at CACLS or iCACLS:

http://www.mydigitallife.info/2007/04/30/i...to-manage-acls/

Do not store random setting files in @windowsdir. Very sloppy. Might as well start using gotos.

Edited by TurionAltec
Link to comment
Share on other sites

Thanks a lot :party: How came i never thought of @AppDataDir ?

And this thing about programs not using their own install dirs to save data in is new to me... Diablo II saves its savegames there. and thats from Blizzard...

Though I understand thing might have changed a bit since Win98 :)

[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...