Hello,
I tried to use the VBScript to get the current path in Windows Vista (WSH 5.7) with the following methods, but both failed to obtain the current path.
Set objShell = CreateObject("WScript.Shell")
strPath = objShell.CurrentDirectory
strPath returns "C:\Windows\System32"
Set objFSO = CreateObject("Scripting.FileSystemObject")
strPath = objFSO.GetAbsolutePathName(".")
strPath returns "C:\Windows\System32"
What am I doing wrong?
I tried to use the VBScript to get the current path in Windows Vista (WSH 5.7) with the following methods, but both failed to obtain the current path.
Set objShell = CreateObject("WScript.Shell")
strPath = objShell.CurrentDirectory
strPath returns "C:\Windows\System32"
Set objFSO = CreateObject("Scripting.FileSystemObject")
strPath = objFSO.GetAbsolutePathName(".")
strPath returns "C:\Windows\System32"
What am I doing wrong?