Page 1 of 1

Adding a parameter to the target of a shortcut

Published: May 17, 2017 - 11:41
by gaelds
I noticed on a software that the shortcut I created using "create_shortcut" did not work because of a parameter that is in the target of the "official" shortcut. The target of the Start Menu shortcut, created by the software setup, is:

"C:\Program Files (x86)\CASIO\GRAPH 35+ Manager PLUS\ManagerPLUS.exe" /n"GRAPH 35+ Manager PLUS".

But I can't add this /n "GRAPH 35+ Manager PLUS" to the create_shortcut function; it gives me an error:
com_error: (-2147024809, 'Incorrect parameter.', None, None)

create_shortcut(makepath(common_desktop(),'Software','Mathematics','35+ Manager+.lnk'),target=r'%s\CASIO\GRAPH 35+ Manager PLUS\ManagerPLUS.exe /n "GRAPH 35+ Manager PLUS"' %programfiles32, wDir=r'%s\CASIO\GRAPH 35+ Manager PLUS\\' %programfiles32,icon=r'%s\CASIO\GRAPH 35+ Manager PLUS\ManagerPLUS.exe' %programfiles32)