I am using the Windows Scripting Host to execute a VBScript file that my program makes at run-time.

I am having a problem in that the WScript program will hang if I attempt to use a path that does not conform to the old 8.3 file format.

The following Does NOT Work:
Dim wshShell, sScript as string
set wshShell = CreateObject("WScript.Shell")
sScript = "wscript C:\Program Files\Project1\tmp001.vbs"
wshShell.Run sScript, 0, true


The following Does work:
Dim wshShell, sScript as string
set wshShell = CreateObject("WScript.Shell")
sScript = "wscript C:\Progra~1\Project1\tmp001.vbs"
wshShell.Run sScript, 0, true


Is there another way I can do this? Is there a function or api call to retrieve a file path in the 8.3 format?

This is the correct path my program uses but I will not hardcode it as such I will be using app.path to validate the location so I will need a way to retrieve this path with a 8.3 format.

-K