Solved Wrong ordinary file shortcut target - Internal different than external

Thenin

New member
Member
Local time
6:47 PM
Messages
95
I'm working on an application that needs to identify invalid Explorer shortcuts, and I ran into a real stumper: If you look at the external properties of a particular lnk file (in this case to an executable) in Explorer, everything is exactly correct. If you press "Open file location", it finds and shows the correct file.

But if you examine the internal contents of the lnk file itself, it points to an invalid location! My program calls the correct library function to obtain the target of a shortcut file, and it returns that same invalid location. The executable file is located in C:\Program Files, but the internal link points to C:\Program Files (x86)

What the heck is going on? I know how to fix it, simply create a new shortcut. But that's not the point: First, I want to know if this is a known bug in Windows 7 (64-bit), and Second, I need to know when the internal and external shortcut targets differ, so that I can recognize this nasty problem in the future.

Little help?
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home-built
OS
Windows 7 Professional 64-bit
CPU
Intel Core i7-4790K Devil’s Canyon Quad-Core 4.0 GHz
Motherboard
ASUS Z97-A/USB 3.1 Gen 2
Memory
16GB G.SKILL TridentX 2666 (PC3 21300) RAM
Graphics Card(s)
EVGA nVidia GTX-750
Sound Card
LogiLink USB 2.0 7.1 Channel Sound Box
Monitor(s) Displays
DELL U2713HM, ViewSonic 22, HDTV
Screen Resolution
1920x1080
Hard Drives
System is on 2x RAID 0 Samsung 850 PRO 256GB SATA-III SSD

System has several other SATA III disks as well
PSU
Corsair RM750x
Case
CoolerMaster Storm Scout 2
Cooling
CoolerMaster Hyper 212 EVO
Keyboard
Apple Slim, Bluetooth slim
Mouse
Logitech Trackball Marble & Logitech Wireless Trackball
Internet Speed
100 Gbps
Antivirus
Avira AntiVirus Pro
Browser
Waterfox, Opera, Basilisk
Never mind. Apparently, this was only a problem using AutoIt in 32-bit mode. When I switched to 64-bit, the problem disappeared.

Marking thread as solved...
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home-built
OS
Windows 7 Professional 64-bit
CPU
Intel Core i7-4790K Devil’s Canyon Quad-Core 4.0 GHz
Motherboard
ASUS Z97-A/USB 3.1 Gen 2
Memory
16GB G.SKILL TridentX 2666 (PC3 21300) RAM
Graphics Card(s)
EVGA nVidia GTX-750
Sound Card
LogiLink USB 2.0 7.1 Channel Sound Box
Monitor(s) Displays
DELL U2713HM, ViewSonic 22, HDTV
Screen Resolution
1920x1080
Hard Drives
System is on 2x RAID 0 Samsung 850 PRO 256GB SATA-III SSD

System has several other SATA III disks as well
PSU
Corsair RM750x
Case
CoolerMaster Storm Scout 2
Cooling
CoolerMaster Hyper 212 EVO
Keyboard
Apple Slim, Bluetooth slim
Mouse
Logitech Trackball Marble & Logitech Wireless Trackball
Internet Speed
100 Gbps
Antivirus
Avira AntiVirus Pro
Browser
Waterfox, Opera, Basilisk
Back
Top