Jump to content

FileOpen failing on %TEMP%


Recommended Posts

Am I missing something?  I have a simple FileOpen statement to create a temporary file in %TEMP% but it fails unless I am running as admin!  In Win7, %TEMP% evaluates to " C:\Users\<username>\AppData\Local\Temp" ... why in the world would any Win7 user not have access to his own temp directory?

 

$xh = FileOpen('%TEMP%\' & $guid & '.txt', 10)

 

Link to comment
Share on other sites

  • Developers

Your source also has this line in it?:

Opt("ExpandEnvStrings", 1) ;0=don't expand, 1=do expand

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers
1 minute ago, jaja714 said:

p.s. strange that enabling that is not necessary when running as admin.

It might run due to some sort of default directory requiring elevated rights, but doubt it goes to the directory you want it to go. 

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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