function getAppDataFolder(){ var CSIDL_SENDTO = 0x0009; var szSendToPath = Interop.Allocate((255 *2) +2); Interop.Call("Shell32", "SHGetSpecialFolderPathW", 0, szSendToPath, CSIDL_SENDTO, 0); return szSendToPath.ReadString(0); }