Page 1 sur 1

[SOLVED] Programs Menu Shortcut: Create Folder?

Posté : 09 mars 2018 - 15:31
par jnicol
Hi,

I have been using

Code : Tout sélectionner

create_programs_menu_shortcut
to make shortcuts in the Programs Menu under Windows 10.

I would like to create a folder in the Programs Menu with my shortcuts arranged inside the folder. Can this be done? Is there a function that will do this?

Here is an example:

FOLDER1
- Shortcut1
- Shortcut2
FOLDER2
- Shortcut 3
- Shortcut 4

Thanks in advance.
John

Re: Programs Menu Shortcut: Create Folder?

Posté : 09 mars 2018 - 16:24
par htouvet
there are 2 issues in the create_programs_menu_shortcut function:
  • it does not create subfolders of start programs menu prior to create the shortcut.
    it creates the shortcuts in \startup and not in \startup\Programs
I have pushed a fix which will be included in final 1.5.1.

https://github.com/tranquilit/WAPT/comm ... f5c613da0c

meanwhile, you can workaround by using

Code : Tout sélectionner

winshell.programs
function which returns the StartPrograms path and add your subfolder

Code : Tout sélectionner

import winshell
sc_path = makepath(winshell.programs(1),'FOLDER1','Shortcut1')  
ensure_dir(sc_path)
create_shortcut(sc_path,makepath(programfiles32,'myapp','toto.exe')) 

Re: Programs Menu Shortcut: Create Folder?

Posté : 13 mars 2018 - 09:16
par jnicol
Thank you very much! I will give this a shot.

Regards
John
htouvet a écrit : 09 mars 2018 - 16:24 there are 2 issues in the create_programs_menu_shortcut function:
  • it does not create subfolders of start programs menu prior to create the shortcut.
    it creates the shortcuts in \startup and not in \startup\Programs
I have pushed a fix which will be included in final 1.5.1.

https://github.com/tranquilit/WAPT/comm ... f5c613da0c

meanwhile, you can workaround by using

Code : Tout sélectionner

winshell.programs
function which returns the StartPrograms path and add your subfolder

Code : Tout sélectionner

import winshell
sc_path = makepath(winshell.programs(1),'FOLDER1','Shortcut1')  
ensure_dir(sc_path)
create_shortcut(sc_path,makepath(programfiles32,'myapp','toto.exe'))