Can anyone tell me the location of them? I want to make a program that will delete them automatically for me on startup.
Printable View
Can anyone tell me the location of them? I want to make a program that will delete them automatically for me on startup.
I forget where I got this, but it returns the Environment variables.
VB Code:
Option Explicit Private Sub Form_Load() Dim ff As Integer ff = FreeFile Open App.Path & "\Environment.txt" For Output As #ff 'Set form autoredraw property to true to get this example 'to work Dim myuser As Variant Dim I As Integer 'used to test if any environment variables exist 'sometimes they don't Dim sTemp As String I = 1 myuser = Environ(I) sTemp = myuser Form1.Print " " & Environ(I) Print #ff, Environ(I) I = I + 1 'Print all values on form Do While Len(myuser) > 0 Form1.Print " " & Environ(I) Print #ff, Environ(I) I = I + 1 myuser = Environ(I) sTemp = sTemp & myuser ' Print #ff, myuser Loop If Len(sTemp) = 0 Then Form1.Print _ "No environment variables exist" Print #ff, "No environment variables exist" End If Close #ff End Sub
You can then find the variables you need concerning the TEMP and TMP folders.
On XP... C:\Documents and Settings\Your Username\Local Settings\Temp\
I think... there might be an Application Data folder or something in there as well :\