

Label1.Caption := ThisShellLinkRecord.Target įorm1.Caption := 'This is a 64-bit program'

JclShell.ShellLinkResolve(Edit1.Text, ThisShellLinkRecord) įorm1.Caption := 'This is a 32-bit program' You are right, there are different results if compiled as a 32-bit program or as a 64-bit program: procedure TForm1.btn1Click(Sender: TObject) So why does ShellLinkResolve give back the wrong data here?ĮDIT: I've opened the link in Notepad++: I've found only the ABSOLUTE 64-bit program files path in it (no environment variable), see here: goo.gl/jWUDb9 Please note that this is the 64-bit program files path and DOES exist! HOWEVER, this is the wrong path and does not exist! When I manually open the Properties dialog of the Xara Designer Pro start menu link from the Windows Start Menu, the target path is:Ĭ:\Program Files\Xara\Xara Designer Pro X9\DesignerPro.exe Please note the (x86) in the resulting target path which indicates the 32-bit program files path. ThisTargetExePath from the above code results as:Ĭ:\Program Files (x86)\Xara\Xara Designer Pro X9\DesignerPro.exe ThisTargetExePath := ThisShellLinkRecord.Target

JclShell.ShellLinkResolve('C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Xara\Xara Designer Pro X9\Xara Designer Pro X9.lnk', ThisShellLinkRecord)
