Norm Fowler used his keyboard to write :
> BeeJ used his keyboard to write :
>> Eduardo has brought this to us :
>>> "BeeJ" <nospam@spamnot.com> escribió en el mensaje
>>> news:jsvai6$rcb$1@dont-email.me...
>>>>I am trying to launch apps by draggin a desktop Icon to my VB6 app.
>>>> I can handle the case where I get the .LNK or .EXE or .COM
>>>> From the .LNK I can get the .EXE or .COM.
>>>>
>>>> However in some cases I drag an icon from the desktop and wind up with a
>>>> path such as:
>>>>
>>>> C:\Documents and Settings\Administrator\Application
>>>> Data\Microsoft\Installer\{06F64222-5A0C-4184-B2F1-2097763DCCAD}\_3e6859d8.exe
>>>>
>>>> In this case the name of the true app is IconEdit.exe (an Icon Editor I
>>>> really like. Plug!)
>>>>
>>>> Properties of the desktop icon shows nothing useful.
>>>>
>>>> If I double-click the desktop link it does open the app properly so
>>>> Windows translates.
>>>>
>>>> How do I get to the real path to launch the app.
>>>
>>> If the exe is launching another exe, you cannot know that unless you run
>>> the first exe.
>>
>> Does not seem to be the case. When I run the given Path\EXE with a ShellTo
>> command, used to open all other .EXEs, a command window opens but the app
>> does not. If I double-click the same from windows desktop the desired app
>> opens (not a command window). Somehow Windows seems to translate the given
>> to the desired. And again , the sortcut properties gives no usefull info
>> from WE Properties.
>> I get the Path\EXE by programmatically deconstruction the .LNK.
>> That process always works when the .LNK is a different "style".
>> The shortcuts that seem to be a problem are those that an installer has
>> placed on the desktop to be used to install the app initially but once
>> installed the same shortcut acts to open the app.
>> If I right click an EXE in WE and choose create shortcut, I always get an
>> agreeable shortcut that yields the Path\EXE as well as ShellTo either the
>> LNK or the contained Path\EXE.
>
> BeeJ,
> Is there a way you can use ShellExecute with the "Open" statement instead of
> Shell? That should open it with the path as given.
>
> Norm
I recoded to the following but unfortunately I get the same bad results
as using Shell. A command window opens, not the app.
Dim hDC As Long
hDC = GetDesktopWindow()
vRtn = ShellExecute(hDC, "Open", sDPName, sArgs, csEmptyString,
lVBAppWinStyle)
--
Present and unaccounted for.