September 30, 2022

Windows Start Menu

If you can search for a program and find it, it should be easy to add it to the start menu. Right click and a menu should appear that includes "pin to start".

For example, here is how I added Python itself. I opened the windows start menu and began typing "pyth" and by this time Python 3.9.4 (64 bit) had appeared. I right click on this, and a menu appears that includes pin to start. I select this and I am done.

So now I have both python and gvim readily available via my start menu.

Command prompt shortcut

What if you have a python script "myscript.py"? What if you want to make this available to some "ordinary person" without frightening them with the windows commands line and the need to type commands they will have a hard time remembering? There may be many ways to do this, but here is one:

This is pretty easy. You right click in the background to get a menu, find "New" in the menu, use "New" to bring up a submenu, then select "create shortcut". Give it the path:
C:\Windows\System32\cmd.exe
This creates the usual annoying shortcut on the desktop background, but we live with that for a short while. You can click on that (right mouse) to get another menu, select "Properties" and you can tailor it.

I find it useful to change the "Start in" line (it defaults to setting the current directory to C:\Windows\System32). I change it to start in C:\Users\Tom

What we do is to append stuff to the "Target" line.

First we append either /k or /c. We use /k when we want the command window to stay open so we can see output. We use /c when we don't care about the window staying open once we are done. We can separate multiple commands with an ampersand.

To have it run my python "try.py" script, I put this in the "Target" field

C:\Windows\System32\cmd.exe /k python try.py
Note that since try.py is in \Users\Tom, this depends on setting this in the "Start in" line.do this:

To change the name of the shortcut, you don't use properties, you use the "Rename" option in the pulldown menu you get when you right click on the shortcut.

Once I have this all as I like it, I use "pin to start", then delete the shortcut from the desktop. Once you do this though, you lose the ability to fiddle with properties. What you can do is to right click on the icon in the start menu, select more, then "Open file location". This brings up what I guess is file explorer and you can right click on the entry here to get properties.

Note that the shortcut lives in:

C:\Users\Tom\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
You can go here and create shortcuts, but I am not clear what you do to make them "active".
Have any comments? Questions? Drop me a line!

Adventures in Computing / [email protected]