New
#1
Custom toolbar on taskbar startup path problem
Hi there,
I've got different source trees, and each tree has a Shortcut folder (of which I add the shortcut folder to the taskbar)
From the custom toolbar I want to be able to execute the shortcuts (.lnk file to actual bat files somewhere else in my source tree).
Now the problem is all these links are relative paths (so to give an example of one shortcut)
TARGET: %windir%\system32\cmd.exe "/C start ..\UI\VIP.sln
STARTIN: %CD%
now this works wonderful if you double click the link from windows explorer, because the %cd% returns the actual shortcut folder. e.g c:\sandbox\peopleportaltrunk\People.tools.
Now if you execute this shortcut link from a custom toolbar the %cd% returns c:\windows\system32 and that means there is no way to find the actual shortcut folder path.
I've tried various different options to try and retrieve the actual shortcut path, but no luck.
I don't want to use environment variables, as for each toolbar I need to configure environment variables. and that is not an option.
I also had a look at the "wmic datafile where name='vip.sln.lnk' get path" option, and that also does not work as I need to specify the path, but I want to retrieve the path..
It there a way to reset the %cd% to the actual shortcut path, and not the c:\windows\system32? or any other way of getting the shortcut path ??
Regards
Paul