(Declarations)
Declare Function PathCombine Lib "shlwapi.dll" Alias "PathCombineA" _
(Byval szDest As String, Byval lpszDir As String, Byval lpszFile As String) As Long
Sub Click(Source As Button)
Dim sFullPath As String
Dim sResolvedPath As String
sFullPath = "C:\Windows\System32\drivers\..\..\..\autoexec.bat"
Msgbox sFullPath
sResolvedPath = Space$(255)
Call PathCombine(sResolvedPath, sFullPath, "")
sResolvedPath = Left$(sResolvedPath, Instr(1, sResolvedPath, Chr$(0)) - 1)
Msgbox sResolvedPath
End Sub
provided by Julian Robichaux at nsftools.com.
No comments:
Post a Comment