Get the current temporary directory path in VBScript

vbscript

The VB trick to get the path of the current temporary directory:

Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long 

fails in VBScript. So?

Best Solution

WScript.CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2)

It took me a while to find it on Google. So for the next one looking for the same as me...

Related Question