Sign in to follow this  
Followers 0
datom

problem with creating a shortcut

5 posts in this topic

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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" )

Share this post


Link to post
Share on other sites

great!

thanks for your help!

It now works all right!

Share this post


Link to post
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
Sign in to follow this  
Followers 0