answersLogoWhite

0


Best Answer

Here is how to open a Windows Shortcut file Using VB6. This is a safe and documented method.

Create a New VB6 Project

In the Project References Add "Windows Script Host Object Model"

Place a Command Button on the form named CommandButton1

Click on CommandButton1

Private Sub CommandButton1_Click()

Dim Oshell As New WshShell

Dim Osh As WshShortcut

Dim Fn As String

Dim Otarget As String

'Set the path and file name of the shortcut

Fn = "C:\shortcut path\shortcut filename.lnk"

'

' If the shortcut file is existing, it will open the existing file

'

Set Osh = Oshell.CreateShortcut(Fn)

Otarget = Osh.TargetPath

'

' Using the Watch window see the other properties of Osh object

'

End Sub

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you retrieve the target path of any existing shortcut such as a lnk file in Visual Basic?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you edit the 'target' box in a shortcut?

Right-click the icon Select properties There will be a text box next to the word "target." Edit away!


How do you play Halo in a window?

Right-click the shortcut, select "Properties." Click the shortcut tab. Under "Target", add -window on the end, inside the quotation marks.


Can you open a shortcut file?

Assuming you are talking about Microsoft windows it is possible to right click on the shortcut and select properties, this will show you what the shortcut points at, and the directory it expects to be running in. If you are talking about shortcuts on a unix box, enter the 'ls -l' command and the shortcut will be expanded so you can see the target


How can you play computer games in a window?

right click on the games shortcut and in the target area ant the end of the target and a space then type -window hope that helps


How you can acces flora editor in spore?

First, crate a shortcut of SporeApp (on your C drive) and put it on your desktop. Right-click it and go to "Shortcut Properties" then "Shortcut". Under "Target" cut and paste this (including the space at the beginning): -state:FloraEditor Open SporeApp to test it.


I lost Minecraft desktop shortcut and I have no idea what all the extensions for the Java Runtime Environment are. What is the Minecraft desktop shortcut target?

You would want to navigate to %appdata%/.minecraft/bin and run minecraft.jar with the Java Runtime Environment.


What key do you hold down while dragging a file from one folder to another that creates a shortcut to the file in the target folder?

Alt


How do you use skills in Legend of Edda?

It should be on your shortcut bar. If not, I recommend dragging all of your skills there. View your skills by clicking 'K'. If you click 'K' or have it in your shortcut bar, choose a target and double click the skill! Hope my answer helped!


How do you convert a jpg shortcut back a normal jpg file?

You can't. A shortcut file is a completely different file format that basically stores the location of where ever you shortcut-ted and then loads Windows Explorer or a program with that location. If the shortcut still works and you are on a windows computer you could try: 1. Right click on shortcut 2. Copy the Target 3. Go in to Windows Explorer (Start -> My Computer) 4. Paste the Target (may have to double click in W7) 5. Press enter. If the image comes up then delete the image name up until the nearest / or \ then press enter. 6. You'll find your JPG in this folder.


What has the author Dean Gaston Purcell written?

Dean Gaston Purcell has written: 'Detection of a visual target in a multiple pulse paradigm' -- subject(s): Visual perception


What company produced Visual Studio 2008?

Visual Studio 2008 was produced by Microsoft. One of the new features of Visual Studio 2008 was to enable the user to build applications that target multiple versions of the NET Frame


Were to download halo devmode?

once you upgrade to Halo: Custom edition, create a shortcut of the exe, then type in -console -devmode in the target after the location of the exe.