Sign in to follow this  
Followers 0
cburak

FileInstall with user permissions

4 posts in this topic

Hi

I wrote a small application with small gui which uses custom animations and graphics. I know I have to use #include and FileInstall(), but cant decide where to put my temporary files? My script doesnt need to admin rigths so I didnt add #requireadmin paramater to top of my script. I know little about UAC and Windows user permissions. I allways use my computer with adminright and script is running just fine in mu pc. But I will distribute that scipt so where should I put my temp files with least permissions.

$k[0]=@AppDataCommonDir
$k[1]=@AppDataDir
$k[2]=@ProgramsDir
$k[3]=@DocumentsCommonDir
$k[4]=@FavoritesDir
$k[5]=@LocalAppDataDir
$k[6]=@MyDocumentsDir
$k[7]=@TempDir
$k[8]=@WorkingDir

BTW a friend of mine told me (Iam not sure) that I have to choose it wisely because not all system have all temp folders.

Thank you for any suggestions?

Share this post


Link to post
Share on other sites



For my applications, I create a folder in the @AppDataCommonDir.  This allows the application to access files across user profiles, and permissions are not much of an issue accessing and writing to this folder.  If you want the data to be profile related, then create a folder in @AppDataDir.  

 

Adam

Share this post


Link to post
Share on other sites

I would use @TempDir. Not sure what your friend means by "not all system have all temp folders", but when you create a profile in Windows, the temp directory will automatically be set. By using the @TempDir macro, even if an admin has reset the path, you don't have to worry about it.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Thank you both for advice.

I tought I should have adminrights to write a file. Now I know I can use those dir's without permission.

Share this post


Link to post
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
Sign in to follow this  
Followers 0