Jump to content

FileInstall with user permissions


cburak
 Share

Go to solution Solved by AdamUL,

Recommended Posts

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?

Link to comment
Share on other sites

  • Solution

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

Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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...