Jango Posted December 22, 2008 Share Posted December 22, 2008 (edited) Hello, I'm using the macro @TempDir to write a log file in various script, for one of this script i noticed the log was not created then i added a msgbox to see what happened, here is the code: Global $LOGFILE = @TempDir & "\NET-smb.log" . . . If Not FileExists($UPDATE_PATH & "\" & $UPDATER) Then MsgBox(0, "", "3.2 " & $LOGFILE & " " & $UPDATE_PATH & "\" & $UPDATER & " not found check the path") _FileWriteLog($LOGFILE, $UPDATE_PATH & "\" & $UPDATER & " not found check the path") Exit(1) EndIf In fact my log file is created but in C:\Windows\TEMP ??? and NOT in the path of the EnvVar %Temp% .... why ? For me the @TempDir must be equal %Temp% EDIT: When i do in a dos box: echo %Temp% i get C:\Users\xxxx\AppData\Local\Temp And i tested EnvGet("TEMP") i get C:\Windows\TEMP ... i don't understand Edited December 22, 2008 by Jango Link to comment Share on other sites More sharing options...
Jango Posted December 22, 2008 Author Share Posted December 22, 2008 Sorry but in the same time i found what happen. I run my program with RunAsWait with option interactive no profile then AutoIt take the SYSTEM ENVVAR %Temp% wich is C:\Windows\Temp I think this post could be intresting to others anyway. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now