Question how to get shortcut icon name of exe

vaithi846

New member
Joined
Dec 16, 2011
Messages
2
Programming Experience
1-3
Hi, I have an application in vb.net. after building i will be getting the exe. once i create the shortcur for this exe consider shortcur of myexe.exe in desktop, how can i get the name of the shortcur icon (i.e "shortcur of myexe.exe") through my vb.net application. Here i have below scenario. I have three shortcut(my1.exe,my2.exe,my3.exe) for an exe named as "My.exe" if i click on my1.exe i should get the shortcut icon name as my1.exe if i click on my2.exe i should get the shortcut icon name as my2.exe if i click on my3.exe i should get the shortcut icon name as my3.exe So based on shortcut name i am proceeding different thinks withing the application. Can anybody help me on the same. Regards, Vaithilingam.K
 
The shortcut name is irrelevant. You just pass a different commandline argument to the application from each shortcut and you process the commandline arguments in the app. Your commandline might look like "myapp.exe -1" or "myapp /a". It is completely up to you what format they take and what values to use, but it is customary to precede them with a dash or forward slash. In code, you can call Environment.GetCommandLineArgs to get a String array containing all the commandline arguments, where the first one is the exe name itself.
 
Back
Top