VS 2010 Create Shortcut To Exe?
Oct 15, 2011How to create a shortcut of application (C:MyApp.exe) to desktop with icon?
EDIT: I've find the solution..
[Code]...
How to create a shortcut of application (C:MyApp.exe) to desktop with icon?
EDIT: I've find the solution..
[Code]...
I'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'm having problems to create a shortcut key to show another form.
For example, If i will click F1 another form will pop up. Kindly check the codes that I used.
Private Sub Form6_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
txtDate.Text = CDate(Date.Today)
End Sub
[Code].....
Im trying to create a program that will be using a shortcut key in displaying a form. But im having problems on how to know if the cursor is on the textbox or datagrid.For example, If I clicked the textbox, and i clicked f1, Customer List Form should appear. No problem with this. I used the following
If txtCustomerName.Focused = True Then
If e.KeyData = Keys.F1 Then
Form9.ShowDialog()
End If
End If
But when I Clicked the cell on the datagrid, and click F1, Product List Form should appear. This is my problem, the form is not appearing when i click f1.Here is my
If dgvSalesEntry.Focused = True Then
If e.KeyData = Keys.F1 Then
Form8.ShowDialog()
End If
End If
I'm in the process of trying to create a class that will allow me to create windows shortcut; Im using the following PDF file that gives me the shortcut file structure.
Ive been able to successfully load a shortcut file and parse its Lnk File Structure but now Im on the Shell Item ID List structure but I cannot find the Structure of the ITEMIDLIST anywhere
Furthermore I know I could use the Windows script object, but this is a dependency Im trying to avoid if I can, hence writing my own Shortcut class.
i wamt to create a shorcut with IWshRuntimeLibrary
i be sucssed on create a shortcut but i want to dedicate icon of target file to shortcut.
how can i dedicted the target icon to my shortcut
method is "IconLocation"
I just have a question about creating a shortcut to my programs path. The problem I have is the program has to run from a Mapped drive.
Example of how the shortcut should look.
Target: R:appapp9app9Filesmyapp.exe @app.ini
Start in: R:appapp9app9Files
So here is the question if the mapped drive path is different every time depending on how the user maps the share how can I tell VB to find the path to myapp.exe ?
I am developing a project in which on clicking on create button A shortcut to disable Firewall in Windows 7 will be created on desktop. The command is netsh firewall set opmode enable We can though simply create a shortcut through desktop > right clcik > new > shortcut > netsh firewall set opmode enable > finish But I want to create it when user want on desktop any ideas how to do iy.
View 2 Repliesi want to ask how to create shortcut ?
[Code]...
I am trying to create a desktop shortcut from vb.net code on a Windows 7 box (64 bit). The following code works on XP, but when run on Win7 I just get a message stating the App has stopped working:
[Code]...
On form load how would i create a shortcut of my .exe (application) and place it in c:my shortcut ?
View 14 RepliesI have been trying to work on a utility that creates an Internet shortcut to the URL the user specifies and places the shortcut in the location the user specifies.
I found C++ code (which has syntac errors, apparently, so I can't convert it.), VB6 code (which also had a problem being converted), and VBS code (which is pretty much incompatible with everything).
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 created a setup project and tried to create a shortcut for it in "User's desktop" but never work. When I click the shortcut I created, it always open Desktop screen instead of open exe file.How to create shortcut for program?
View 4 RepliesI 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 RepliesI am trying to create a shortuct key that when you press alt-enter together it will make the media player control full screen. I tried adding the following code to the onkeypress event of the media player control but it didn't work. How can you make shortcut keys?
If e.nKeyAscii = Keys.Alt And e.nKeyAscii = Keys.Enter Then
mediaPlayer.fullScreen = True
End If
how 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 would like to create a simply shortcut to a specified program. All of the codes I've tried use the WshRunTime library and it seem to throw an exception every time.
View 3 RepliesI use vb.net 2005 . I need to create a short cut for a folder. For example
I need create shortcut for "C:SourceFolder "in "D: DistenFolder" and also find
How many Shortcuts are present in this folder?
I made a media player. Dont want to sell it, just want to give it to people to use. The problem is getting it to others. I tried doing an install and that works. Puts the files in the C drive but it doesnt give an option for creating a shortcut to the desktop. I want this to be easy for people so they dont have to manually go into the C drive where it installed, find it and then right click and create shortcut. Is there an installer that gives the option to create the desktop shortcut?
View 19 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 RepliesI just published a new sample on the MSDN Code Gallery. This may be useful for the community here if you would like to deploy your application without an installer and still have an option to create a shortcut.
This Desktop Shortcut sample allows programmers to give consumers a way to easily create a shortcut for the application. Most installers automatically come with this feature, but some prefer to keep installers lightweight and provide the shortcut manually.[URL]..
Is there any way to create a custom shortcut (one that is not there in the Windows.Forms.Shortcut enumeration) and attach it to a MenuItem. Example I want Ctrl+'+' to be a shortcut for a menuitem. Its not there in the enumeration.
View 6 RepliesI need to create a shortcut to my VB.NET program when the user presses a button but I cannot use the WshShell method because all windows scripting are disabled on the systems.In VB6, I was using the following API:
Private Declare Function fCreateShellLink Lib "vb6stkit.dll" (ByVal lpstrFolderName As String, _
ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArguments As String, _
ByVal fPrivate As Long, ByVal sParent As String) As Long
Would that be a good alternative to create a shortcut from VB.NET, or is there a better way (without scripting)?
How do I create a desktop shortcut to my application when the user presses setup to install?
View 7 RepliesHow 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 am using vb.net 2010 and in my application I need to change desktop icons depending on the business type my client is in[code]....
View 8 RepliesI 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 had the following error occurred when i want to create shortcut and copy to startup folder. [Code] I don't understand the error message box.
View 7 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 Replies