Jump to content

How to create shortcuts group in windows ?


Recommended Posts

Hi Friends,

I am using this shortcut script ( http://www.optimumx.com/download/ ) to make shortcuts on desktop and "start menu->programs". But I am not getting how to create a group under which I would like to place all these shortcuts.

The readme file states this:

The syntax of this command is:

Shortcut.exe /F:filename /A:C|E|Q [/T:target] [/P:parameters] [/W:workingdir]
[/R:runstyle] [/I:icon,index] [/H:hotkey] [/D:description]

/F:filename : Specifies the .LNK shortcut file.
/A:action : Defines the action to take (C=Create, E=Edit or Q=Query).
/T:target : Defines the target path and file name the shortcut points to.
/P:parameters : Defines the command-line parameters to pass to the target.
/W:working dir : Defines the working directory the target starts with.
/R:run style : Defines the window state (1=Normal, 3=Max, 7=Min).
/I:icon,index : Defines the icon and optional index (file.exe or file.exe,0).
/H:hotkey : Defines the hotkey, a numeric value of the keyboard shortcut.
/D:description : Defines the description (or comment) for the shortcut.

Examples:
/f:"%ALLUSERSPROFILE%\Start Menu\Programs\My App.lnk" /a:q
/f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:c /t:^%WINDIR^%\Notepad.exe /h:846
/f:"%USERPROFILE%\Desktop\Notepad.lnk" /a:e /p:C:\Setup.log /r:3

I tried the first command and it created a shortcut for me like:

Start->Programs->Shortcut

Whereas I would like to have it like this:
Start->Programs->MyCompany->Shortcut1
Start->Programs->MyCompany->Shortcut2
Start->Programs->MyCompany->Shortcut3

I would appreciate if someone can give some pointers.

Thanks

Edited by micks80
Link to comment
Share on other sites


Nevermind guys,

Figured it out. Just had to issue a make directory command to make a directory first under "%userprofile%/start menu/programs/mycompany" and then issuing the shortcut command specified above and it works like a charm.

Thanks

Link to comment
Share on other sites

Thanks Yzowl,

I looked into that thread and would probably change to some other option but unfortunately I cannot make that change this week.

I am encountering a different issue deleting the shortcut which has nothing to do with the script. I just use "rmdir" to delete the "mycompany" directory I created under %userprofile% but it's not working.

Can someone tell me when I click the "Start->Programs->MyCompany->MyShortcut" link, where does the command gets executed from???? The link is pointing to "C:/Mycompany/uninstall.cmd" file. So when the command runs, does it runs from "%userprofile%/mycompany" directory or "C:/Mycompany" directory???

Your help would be greatly appreciated.

Thanks

Link to comment
Share on other sites

There should be an entry in your shortcut properties stating Start In:, however if you want it to be running local to the script I'd recommend you avoid that and ensure that your batch file is written a little better.

Without seeing the batch file I'd suggest that fairly early on in the script you use:

Pushd %~dp0

That will ensure that everything is run from the same location as your batch script.

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
  • Recently Browsing   0 members

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