I am having an issue within my WinPE that I don't know how to resolve. I am going off of this tutuorial: http://www.msfn.org/...ghost-menu-hta/
I have a mapped network drive and I am trying to add the ghost image file address to the ghost command, but it cannot resolve the targetpath of the shortcut. When I do this in my normal OS, it can find everything perfectly - but when I move to my WinPE it cannot get the targetpath. It can get the description and location of the shortcut (lnk) on the mapped drive. Here is my snippet:
...
Dim colFilelist, objFile, strButtons, objShortcut, colTargetList, objTarget, x, y, strKey, strItem
ReDim arrButtons(1,-1)
details.innerHTML = ""
details.style.visibility = "hidden"
Set colFileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='M:\" & fileName & "'} Where ResultClass = CIM_DataFile")
For each objFile in colFileList
'MsgBox objFile.name
If objFile.Extension = "lnk" Then
Set objShortcut = objShell.CreateShortcut(objFile.name)
'odd = objShortcut.targetpath
'MsgBox odd
ReDim Preserve arrButtons(1,UBound(arrButtons,2)+1)
arrButtons(0,UBound(arrButtons,2)) = objShortcut.Description
arrButtons(1,UBound(arrButtons,2)) = "<Input type=radio name=radioList id='" & objShortcut.targetpath &_
"' onClick=showRadioInfo>" & objShortcut.Description & "</BUTTON><BR>"
End If
Next
It does get the shortcuts, but just not the shortcut path. Any ideas? I can post more code if need be.
If I just do a
Msgbox "Path =" & objShortcut.targetpath
It will just show
Path =
But if I do
Msgbox objShortcut.nameit will provide the name of the shortcut(lnk) ( same concept with objShortcut.Description)
This post has been edited by ZeroStack: 13 July 2012 - 04:09 PM



Help
Back to top









