Is there anyone who knows how to parse a windows shortcut (lnk file) on the
start menu? How hard could it be, it is just a few values, like Target file,
Icon file...
I search for in on Internet for a while, but I did not found anything.
So what I want is the sourse code for a shortcut parser, written in VB.net
if possible (C# would be ok), or at least the specification for how a
shortcut (LNK file) is build, so I can writ one myself.
Thanks in advance 6 9294
Cross wrote:
Is there anyone who knows how to parse a windows shortcut (lnk file) on the
start menu? How hard could it be, it is just a few values, like Target file,
Icon file...
I search for in on Internet for a while, but I did not found anything.
So what I want is the sourse code for a shortcut parser, written in VB.net
if possible (C# would be ok), or at least the specification for how a
shortcut (LNK file) is build, so I can writ one myself.
Google is your friend ;-)
<http://www.google.com/search?q=lnk+fi le+format>
The first result here is:
<http://mediasrv.ns.ac. yu/extra/fileformat/windows/lnk/shortcut.pdf>
Here is a script to create a lnk file on the desktop:
<http://www.knowdotnet. com/articles/createshortcuto ndesktop.html>
Instead of "Desktop" the Specialfolder is "Startmenu" in the line
CType(WshShell. SpecialFolders. Item("Desktop") , String)
HTH
--
Greetings
Matthias
Thank you really.
I tried with google, but I must have picked the wong search criteria.
"Matthias Tacke" <Ma******@Tacke .dewrote in message
news:f0******** **@news.albasan i.net...
Cross wrote:
>Is there anyone who knows how to parse a windows shortcut (lnk file) on the start menu? How hard could it be, it is just a few values, like Target file, Icon file... I search for in on Internet for a while, but I did not found anything.
So what I want is the sourse code for a shortcut parser, written in VB.net if possible (C# would be ok), or at least the specification for how a shortcut (LNK file) is build, so I can writ one myself.
Google is your friend ;-)
<http://www.google.com/search?q=lnk+fi le+format>
The first result here is:
<http://mediasrv.ns.ac. yu/extra/fileformat/windows/lnk/shortcut.pdf>
Here is a script to create a lnk file on the desktop:
<http://www.knowdotnet. com/articles/createshortcuto ndesktop.html>
Instead of "Desktop" the Specialfolder is "Startmenu" in the line
CType(WshShell. SpecialFolders. Item("Desktop") , String)
HTH
--
Greetings
Matthias
I like it forever to show the first and last help I got from Herfried, and
one of the main reasons I am active in this newsgroup.
\\\
AxWebBrowser.Na vigate("about :< html><body
onload=javascri pt:window.exter nal.addFavorite ('" + textbox1.Text +
"')></body></html>")
///
You never know how it helps you, I am not so sure about what you are asking.
Cor
"Cross" <cr*********@ga wab.comschreef in bericht
news:uU******** ******@TK2MSFTN GP04.phx.gbl...
Is there anyone who knows how to parse a windows shortcut (lnk file) on
the start menu? How hard could it be, it is just a few values, like Target
file, Icon file...
I search for in on Internet for a while, but I did not found anything.
So what I want is the sourse code for a shortcut parser, written in VB.net
if possible (C# would be ok), or at least the specification for how a
shortcut (LNK file) is build, so I can writ one myself.
Thanks in advance
i do it this way.
in vb or vb.net and higher you must leave the 'wshshell' variable.
the example came from script
the control of your dir exist must be changed into a dirinfo
Sub Make_Start_Snel koppeling()
Dim OS, Link, User, fso, folder
Set WshShell = CreateObject("W Script.Shell")
strstartup = WshShell.specia lfolders("Progr ams") & "\StartUp"
Set fso = CreateObject("S cripting.FileSy stemObject")
folder = strstartup
If Not (fso.FolderExis ts(folder)) Then
fso.createfolde r (folder)
End If
Set OS = CreateObject("W Script.Shell")
'new macros
Set Link = WshShell.Create ShortCut(strsta rtup & "\Some name.lnk")
Link.Descriptio n = "Your description"
Link.Hotkey = "Ctrl+Alt+n "
Link.iconlocati on = "C:\WINNT\syste m32\moricons.dl l, 91"
Link.targetpath = "C:\WINNT\syste m32\CMD.EXE"
Link.windowstyl e = 7
Link.workingDir ectory = "C:\"
Link.Save
end sub
"Cor Ligthert [MVP]" <no************ @planet.nlschre ef in bericht
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>I like it forever to show the first and last help I got from Herfried, and one of the main reasons I am active in this newsgroup.
\\\
AxWebBrowser.Na vigate("about:< html><body
onload=javascri pt:window.exter nal.addFavorite ('" + textbox1.Text +
"')></body></html>")
///
You never know how it helps you, I am not so sure about what you are
asking.
Cor
"Cross" <cr*********@ga wab.comschreef in bericht
news:uU******** ******@TK2MSFTN GP04.phx.gbl...
>Is there anyone who knows how to parse a windows shortcut (lnk file) on the start menu? How hard could it be, it is just a few values, like Target file, Icon file... I search for in on Internet for a while, but I did not found anything.
So what I want is the sourse code for a shortcut parser, written in VB.net if possible (C# would be ok), or at least the specification for how a shortcut (LNK file) is build, so I can writ one myself.
Thanks in advance
Jr,
I think that you will be happy with this more by the time way. It covers in
my idea even more. http://www.vb-tips.com/dbpages.aspx?...b-23cab5aa1049
Cor
"JR" <x.*@x.xschre ef in bericht
news:Ii******** *************@p hobos.telenet-ops.be...
>i do it this way.
in vb or vb.net and higher you must leave the 'wshshell' variable.
the example came from script
the control of your dir exist must be changed into a dirinfo
Sub Make_Start_Snel koppeling()
Dim OS, Link, User, fso, folder
Set WshShell = CreateObject("W Script.Shell")
strstartup = WshShell.specia lfolders("Progr ams") & "\StartUp"
Set fso = CreateObject("S cripting.FileSy stemObject")
folder = strstartup
If Not (fso.FolderExis ts(folder)) Then
fso.createfolde r (folder)
End If
Set OS = CreateObject("W Script.Shell")
'new macros
Set Link = WshShell.Create ShortCut(strsta rtup & "\Some name.lnk")
Link.Descriptio n = "Your description"
Link.Hotkey = "Ctrl+Alt+n "
Link.iconlocati on = "C:\WINNT\syste m32\moricons.dl l, 91"
Link.targetpath = "C:\WINNT\syste m32\CMD.EXE"
Link.windowstyl e = 7
Link.workingDir ectory = "C:\"
Link.Save
end sub
"Cor Ligthert [MVP]" <no************ @planet.nlschre ef in bericht
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>>I like it forever to show the first and last help I got from Herfried, and one of the main reasons I am active in this newsgroup.
\\\ AxWebBrowser.N avigate("about: <html><body onload=javascr ipt:window.exte rnal.addFavorit e('" + textbox1.Text + "')></body></html>") ///
You never know how it helps you, I am not so sure about what you are asking.
Cor
"Cross" <cr*********@ga wab.comschreef in bericht news:uU******* *******@TK2MSFT NGP04.phx.gbl.. .
>>Is there anyone who knows how to parse a windows shortcut (lnk file) on the start menu? How hard could it be, it is just a few values, like Target file, Icon file... I search for in on Internet for a while, but I did not found anything.
So what I want is the sourse code for a shortcut parser, written in VB.net if possible (C# would be ok), or at least the specification for how a shortcut (LNK file) is build, so I can writ one myself.
Thanks in advance
"Cor Ligthert [MVP]" <no************ @planet.nlschri eb:
I think that you will be happy with this more by the time way. It covers
in my idea even more.
http://www.vb-tips.com/dbpages.aspx?...b-23cab5aa1049
Is there any reason why backslashes are escaped the C#-style way in the
string containing the path?
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TC |
last post by:
I know .NET setup projects use "Windows Installer" shortcuts instead of
ordinary shortcuts, but I'm having trouble with those, so I'd like to
hard-code some ordinary shortcuts in the user's start menu. The problem
is, the setup project will let me put every kind of file in the start
menu except .lnk files. The one file type I need is the one file type
which seems to be rejected.
Perhaps there is some trick I don't know about. For the...
|
by: Stanislaw Findeisen |
last post by:
Does anyone know how to create file shortcuts in Windows?
The only way I know is like:
---------------------------------------------------------------
import win32com.client
wScriptShellObject = win32com.client.Dispatch("WScript.Shell")
shortcutName = unicode("shortcut.lnk", "utf8")
|
by: David Krmpotic |
last post by:
Hi All!!
Could you please help me with three problems:
1.
I would like to have a procedure that returned true if the file is
writtable=deletable.. I tried everything but so far the only way I can
really tell if the file can be delete is to actually try to delete it and
catch an exception.. Trying to open a file with StreamReader in write mode
|
by: noleander |
last post by:
Hello. Ive got a VC++ program. Inside the program Ive got some code that
has a full file path:
C:\aa\bb\cc\dd\file.txt
One of the folders in that path (cc) is a shortcut pointing to some other
folder far away.
The program doesnt seem to follow the shortcut. Im used to Unix, where
shortcuts are indistinguishable from folders (or files) and you cannot have a
|
by: DH |
last post by:
Hi,
I'm trying to strip the html and other useless junk from a html page..
Id like to create something like an automated text editor, where it
takes the keywords from a txt file and removes them from the html page
(replace the words in the html page with blank space) I'm new to python
and could use a little push in the right direction, any ideas on how to
implement this?
Thanks!
| |
by: garyusenet |
last post by:
I want to write a quick and simple programme to update a shortcut on
about 20 peoples workstations. They will all have the same shortcut, so
I thought the simplest way would be to create the shortcut on one
computer and just copy it to their desktops.
However I would like to add two extra features to this.
1.
I would like to log when the users use the programme. I will just
create a network text file and append a line each time the...
|
by: Sin Jeong-hun |
last post by:
I would like to display the shortcuts in a folder on my C#
application. Of course I would like the linked application to be
executed when the user double click on a icon.
To do so, I need to be able to get the icon and the target path
from .lnk files. I've searched Google and found that many pages lead
to http://www.msjogren.net/dotnet/eng/samples/dotnet_shelllink.asp.
The sample program looked fine and I thought it would give me all...
|
by: deerhide |
last post by:
Hi, I was updating my website, well trying to... and I somehow messed it up. I didnt build it, I bought it so I don't know alot about programming. I receive these errors when going to minbiketrader.com :
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/content/m/i/n/minibiketrader/html/index.php on line 2
Parse error: parse error, unexpected T_REQUIRE_ONCE in /home/content/m/i/n/minibiketrader/html/index.php on line...
|
by: David Jackson |
last post by:
Hello,
I've been asked to write a sort of "desktop clean-up" utility.
Requirements are simple: iterate through the shortcuts (*.lnk files) on the
currently logged-on user's desktop, and delete each link whose TargetPath
property no longer exists.
Iterating through the shortcuts on the desktop is easy enough using
Directory.GetFiles(*.lnk)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |