I've got a VBScript that has a section which creates a temporary file:
Set FSO = WScript.CreateObject("Scripting.FileSystemObject")
Const TemporaryFolder = 2
Set tempFolder = FSO.GetSpecialFolder(TemporaryFolder)
logFname = FSO.BuildPath(tempFolder.ShortPath, FSO.GetTempName)
Set logFile = FSO.CreateTextFile(logFname, True)
logFile.Close
This appears to work on NT, Windows XP, Windows 2000, Windows 2003...
except in a few cases where we've seen the value returned from
ShortPath
still has embedded spaces, e.g.
C:\DOCUME~1\<username>\Local Settings\Temp\2
Is this a known issue? Any workaround or suggestions on how to
correct this?