Copy Shortcut From Desktop?
Apr 22, 2010What I'm trying to do is copy a shortcut from my desktop to my form. So the I would have a shortcut on my form just like the desktop.
View 2 RepliesWhat I'm trying to do is copy a shortcut from my desktop to my form. So the I would have a shortcut on my form just like the desktop.
View 2 RepliesHow do I create A Desktop Shortcut ? Is there any particular command that will do it for me ?
View 3 RepliesI'm having issues with using this command.
Running: VS 2008
OS: Windows 7
I'm trying to delete a shortcut on my desktop.
I use the command:
Dim outdatedShortCut As String = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "" & outdatedShortCutName & ".lnk"
Kill(outdatedShortCut)
What happens is whilst it DOES delete the shortcut from the desktop, it's stays on my desktop until I have done a refresh.
My question is: -
1. Is this normal?
2. If it is normal, what steps do I take to change this so it just deletes?
2a. Do I need to programmatically force a desktop refresh?
2b. Or is there another delete method that bypasses the need to refresh?
I am trying to create a 'Desk Top' Short Cut, for a Web Browser I created with Visual Basic 6. I will put it onto my website, so the public can download it (the Web Browser).*It will be an exe (Executable File).My short cut ( on the desk top) will*be a picture*ICON .ico file, which is a logo I created.I imagine it will be*stored*in the C Drive of most computers, in the Program Files. PATH: C:Program ilesHomeChannelTVHomeChannelTV.exe *I've tried to learn from many forums. The code I have created is below. I'm getting 1 error.
MyShortcut = CType(WshShell.CreateShortcut(DesktopFolder & ".lnk"), IWshRuntimeLibrary.IWshShortcut)
MyShortcut.TargetPath = Application.StartupPath & "C:Program
[code].....
I have been asked to create a web application which would allow users to login to the system using a shortcut from the desktop. The short cut has to be user specific.
View 10 Replieshow can i create a desktop shortcut for my vb.net project that i've done.?my project is a Sudok game.. .i mean how can i open it without using Visual programs?
View 8 RepliesI am working in VB.NET 2003. I have one exe file in a particular folder. I want to create desktop shortcut icon for that exe file. How can I do this?
View 1 RepliesIf i drag 'n drop a desktop shortcut to a picturebox , how can i display its name on a mouse_hover event ? Or any other way.
View 5 RepliesHow do I create a desktop shortcut to my application when the user presses setup to install?
View 7 RepliesI would like to create a desktop shortcut for my clickonce deployed application.The IDE is VS2005 and there is no need for upgrading to 2008 yet.
View 3 RepliesIs it possible to drag an drop a desktop shortcut to the form and then launch the program from there ? Is so how would this be done ?
View 39 RepliesI found this thread[url]...
and I have encountered the exact same problem, that the desktop shortcut icon created by the Setup program does not work when dragging and dropping a file (in this case an Access-database) onto it,
while a shortcut manually created works just fine.
I do not understand the answer in the above thread. But, anyway I would like to find a way to solve the problem directly, preferably through the Setup program itself.
I have a client app written in VB (Visual Studio 2008) + VS 2008 SP1. I can see the option "Create desktop shortcut" under --- Publish > Option > Manifest but it is disabled.What do I need to do to enable it so I can have it checked before publishing it?
View 3 RepliesI have a project that I've published to a network drive with a setup file that works great but I cannot get it to create a Desktop shortcut. I don't have the option in the publish settings to allow this and I cannot find code that will work for me. Does anyone have any suggestions how to have the setup file automatically create a desktop shortcut? I'm using Visual Studio 2008.
View 1 RepliesI'm writing a vb.net (2010) app to extract a zip file in XP to a specific folder. That part works fine. Now I want to create a desktop shortcut to an application (if it exists I need to delete it first)
This should be an easy to find answer but I believe my eye is beginning to twitch!2 error messages: First Error: "Type expected" On Dim shortCut As IWshRuntimeLibrary.IWshShortcut = DirectCast(WshShell.CreateShortcut(FileName, IWshRuntimeLibrary.IWshShortcut), == this is a simple syntax error but I thought the type was the IWshShortcut ==
Second Error: On "With Shortcut" it fusses: " cannot refer to an instance member of a class from within a shared method or shared member initalizer without an explicit instance of the class."
[Code]...
I want to create desktop shortcut for exe file through program. I do not want to use installer to do this. Can a piece of code in program do this?
View 1 RepliesIn VB.NET I used wscript.shell to add a shortcut to the desktop. I didn't realize it created the shortcut on the "All Users" desktop, which means I can't delete it. I don't have admin rights as this is my work computer, and asking for admin isn't an option. WScript.Shell has a createshortcut method but not a remove shortcut method! I've been googling for days with no luck. Windows XP Pro 2002, SP3.
View 1 RepliesI just created a game program out of VBE2008 and did the build process to turn it into a .exe file.When I did the build function I apparently missed the step of attaching an icon to the project.Now when I do a desktop shortcut to the .exe file there is no pretty icon - just an ordinary looking window box.How do I add a desktop shortcut icon to inside the project settings?
View 1 RepliesI am trying to add a funktion to my Program that adds a desktop shortcut when installing.I get a shortcut but it doesnt behave as the program meny shortcut.It doesnt check for newer versions as tje program meny shortcut does.I've been looking at other code but I dont understand how it works. And I dont get it to work.[code]
View 4 RepliesHere's the code that is causing my problem, I have no idea why though. All necessary services have been imported.
'Creates Prompt File
Sub CreateFile()
Dim createstring As String = ""
[Code].....
How can I get all the names of the shortcuts icons in the desktop into a String?
Like: Computer, Microsoft Office Word 2003, Internet Explorer....etz.
I tried to use "My.Computer.FileSystem..." , but didn't find a way.
I have an internet explorer shortcut on my desktop that I am trying to copy to other machines. I am getting a file does not exist error (source file). I know the source file is there, but I still get the error. Any ideas? Here is the line of code where I am getting the error. I have tried with lnk and without lnk extension.
File.Copy("C:Documents and SettingsadminDesktopEmergencyBreakDow� strPath, True)
How do i make my program appear in the startmenu? My idea was to have the program create a shortcut and copy it to the startmenu folder, but how do i have it create a shortcut of it's self?
View 1 RepliesI add a mainmenu I have to edit InitializeComponent().I tried to take a shortcut and copy an existing menu and then rename it. Big mistake. If you have done it, do not do it again.Anyone have an idea of how to get me back on track? I have done a rebuild, closed VB etc.
'frmMain
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font[code]....
This should create a desktop shortcut but instead it spits out an error that is because of the quotes inside quotes. They need to be there, I know this is the problem as I have tried without them and it has worked. Another problem though is that it creates the shortcut (when Idon'thave quotes in quotes) but wraps the whole TargetPath in quotes making the shortcut unusable. Here is my code:
Dim input As String
Dim s As String = Environment.GetEnvironmentVariable("UserProfile")
input = TextBox1.Text
[code].....
Let's say 10 desktop shortcuts, all with different names/icons, point to and can start the same exe application from the same directory. Is there any means for the application to know the distinct name of the shortcut that was doubled_clicked. Also is there any means for a running application to know if it was started by command line, by a double_click on the exe, by a double_click on a shortcut that points to it, or by another process' call?
View 4 RepliesI am trying to use Setup project. Want my setup to create a desktop shortcut with my application.I donot understand how to do it. Clicked on User's desktop, I created Shortcut to User's desktop, changed the properties Target and Working Folder as 'Application Folder'But it does not connect with MyApplication.exe When I ran the setup and tested Desktop short cut, it took me to the folder where application was installed, instead of running the application.How to make the application run using this shortcut?
View 1 RepliesI have a mobile device(IPAQ). I have downloaded a sample program, tried to use it but it doesn't work. I think I have a wrong addressing the source file.
[code]...
I'm writing a small app to collect IE command diag. The problem is it's not waiting till the process finishes and it's errors out in the next line. My goal is to copy the log and paste it under a folder in Desktop
Try
Process.Start("C:Program FilesInternet Exploreriediagcmd.exe")
My.Computer.FileSystem.CopyFile(USERPROFILE & "DesktopIEDiag.cab", USERPROFILE & "DesktopW8IEDiag.cab",
Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
[code].....
I'm trying to extract the icon from a shortcut (lnk file), but I end up with the shortcut symbol in the lower-left hand corner of the image. How can I extract a shortcut's icon without this symbol?
Here's the code I'm using:
Dim ico As System.Drawing.Icon = System.Drawing.Icon.ExtractAssociatedIcon("C:shortcut.lnk")