|12 Aug 2011||#1|
| || |
Custom toolbar on taskbar startup path problem
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
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 ??
|My System Specs|
|15 Aug 2011||#3|
| || |
this does not work with the shortcut files that is linked into the taskbar, but however, after I've replaced all the .lnk files with actual .bat files, and used %~dp0 within the bat file it all works. thanks for the advice.
Unfortunately now all the icons looks the same... (icon of the bat file type) and don't have the actual file type icon of where it points. I guess I have to sacrifice something...
I had shortcuts to websites / .exe files, visual studio solutions with each one with the correct icon, but now all has a .bat file extension at the back and the bat file icon.
|My System Specs|
|Similar help and support threads for2: Custom toolbar on taskbar startup path problem|
|Locked Taskbar and Custom Toolbar||Customization|
|Problem in google search parameter in the Address toolbar in taskbar||General Discussion|
|delay when opening folders on custom toolbar||Customization|
|Custom Toolbar Location is Not Available error||Customization|
|Win7 taskbar hover and JetAudio toolbar mode problem||Software|
|Custom Toolbar -> Games||Customization|
|Our Sites ||Site Links ||About Us ||Find Us |
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
All times are GMT -5. The time now is 10:02 AM.