Jump to content

problem with creating a shortcut


Recommended Posts

hello everybody!

I need some help, please!

I want to create a shortcut in the startmenu to a certain folder. Using the FileCreateShortcut function delivers namely a *.lnk, but not exactly what I want.

I want a shortcut in the start menu that expands on "onmouseover" and shows the content of the dir.

If I navigate to the folder, hit the right mouse button and drag the folder to the startmenu dir, create the shortcut on the rightclick-menu, the result is exaclty what I want.

any idea how to do that by code?

thx a lot

Link to comment
Share on other sites

Not exactly what you are asking for, but if your intention is to install this on other pc's, in the past I created a shortcut and placed it in the installer. Then when you extract or run code to copy it, you can move a copy of it to the folder of you choice. You would simply have to create the shortcut on your machine first.

Link to comment
Share on other sites

hello everybody!

I need some help, please!

I want to create a shortcut in the startmenu to a certain folder. Using the FileCreateShortcut function delivers namely a *.lnk, but not exactly what I want.

I want a shortcut in the start menu that expands on "onmouseover" and shows the content of the dir.

If I navigate to the folder, hit the right mouse button and drag the folder to the startmenu dir, create the shortcut on the rightclick-menu, the result is exaclty what I want.

any idea how to do that by code?

thx a lot

FileCreateShortcut($PathtoFolder,$pathtoShortcut,default,"","what you want to be shown when the mosuse is over the short cut")

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

This would make sure you have Games folder in the start menu and if not add/populate it:

If Not FileExists( @StartMenuDir & "\Programs\Games" ) Then DirCreate ( @StartMenuDir & "\Programs\Games" )
If Not FileExists( @StartMenuDir & "\Programs\Games\Solitare.lnk" ) Then FileCreateShortcut ( "C:\Windows\System32\sol.exe", @StartMenuDir & "\Programs\Games\Solitare.lnk" )
If Not FileExists( @StartMenuDir & "\Programs\Games\MineSweeper.lnk" ) Then FileCreateShortcut ( "C:\Windows\System32\WinMine.exe", @StartMenuDir & "\Programs\Games\MineSweeper.lnk" )
If Not FileExists( @StartMenuDir & "\Programs\Games\FreeCell.lnk" ) Then FileCreateShortcut ( "C:\Windows\System32\freecell.exe", @StartMenuDir & "\Programs\Games\FreeCell.lnk" )
If Not FileExists( @StartMenuDir & "\Programs\Games\Spider.lnk" ) Then FileCreateShortcut ( "C:\Windows\System32\spider.exe", @StartMenuDir & "\Programs\Games\Spider.lnk" )
If Not FileExists( @StartMenuDir & "\Programs\Games\Hearts.lnk" ) Then FileCreateShortcut ( "C:\Windows\System32\MShearts.exe", @StartMenuDir & "\Programs\Games\Hearts.lnk" )
If Not FileExists( @StartMenuDir & "\Programs\Games\3DPinball.lnk" ) Then FileCreateShortcut ( "C:\Program Files\Windows NT\Pinball\pinball.exe", @StartMenuDir & "\Programs\Games\3DPinball.lnk" )
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...