0

I am updating several programs to work on Windows 7 and Windows 8 that were previously only built for Windows XP.

There are many problems to overcome in this process, but the specific one I am asking about here is what to do with code like this:

Private Sub cmdDone_Click()
    Dim OutputList(3) As String

    Call OutputSheathingTypes
    OutputList(1) = glProjectName
    OutputList(2) = glWallTypeFilePath
    OutputList(3) = glSheathingTypeFilePath
    Call OutputListToFile("C:\vbadatapipe.txt", OutputList)
    End
End Sub

specifically this line:

    Call OutputListToFile("C:\vbadatapipe.txt", OutputList)

in Windows XP, Accessing the C:\ directory was no problem. But in later versions of Windows that requires admin shananigans.

I do not want a specific language answer as I have this problem in apps written in several languages that range from LISP to VB6/VBA

What is the new common practice for creating and using these temporary files? Where should I point it to instead for windows 7 and 8 computers?

jth41
  • 3,808
  • 9
  • 59
  • 109
  • @KenWhite Does not Language agnostic make this different? – jth41 Jan 16 '14 at 19:58
  • Yes, you're right; I've removed that additional link. It doesn't change the first one, however. AFA language agnostic, the correct location for the temporary folder doesn't change. Your method of obtaining that location does, but that would be language-specific. Languages that can access the WinAPI should use `GetTempPath()`, and languages that can't should read the environmental variable `%TEMP%`. Either way, they end up in the same location. – Ken White Jan 16 '14 at 20:04
  • gotcha. didnt know how to use the %TEMP% – jth41 Jan 16 '14 at 20:13

0 Answers0