WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: jkjk12 on May 21, 2014, 02:31:47 PM

Title: Rename and repoint start menu library?
Post by: jkjk12 on May 21, 2014, 02:31:47 PM
On a Windows 7 workstation when you click Start you will see icons named:

Documents

Pictures

Music



Using WinBatch how would I rename Music and then change where it points?    I need to change the "library location" which you see when you do a properties on it.  I've Googled the heck out of this and its not as easy as I thought it would be.

Title: Re: Rename and repoint start menu library?
Post by: George Vagenas on May 26, 2014, 04:34:49 AM
Did you look at the shortcut functions?
Title: Re: Rename and repoint start menu library?
Post by: Deana on May 27, 2014, 07:20:00 AM
Not sure what is the best way to handle this. The Windows SHSetFolderPath API looks interesting. It apparently assigns a new path to a system folder identified by its CSIDL.: http://msdn.microsoft.com/en-us/library/windows/desktop/bb762247(v=vs.85).aspx

You could make a DllCall to this API: http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/DllCall~Information+Change~Target~of~My~Documents~Folder.txt

Title: Re: Rename and repoint start menu library?
Post by: ChuckC on June 02, 2014, 09:40:36 AM
Actually, the Library feature that was introduced in Vista and then make fully accessible for being managed in Windows 7 is a separate feature from shell shortcuts and well known paths.  Unfortunately, Microsoft didn't make any automation-enabled COM interfaces for the Library functionality, so that precludes WinBatch, VBscript and Powershell from making direct use of COM interfaces.

I've been considering writing an extender to expose the Library Management COM interfaces in a way that WinBatch could make use of.
Title: Re: Rename and repoint start menu library?
Post by: td on June 02, 2014, 11:32:50 AM
Sounds like a good idea.  MSFT was even thoughtful enough to provide a few helper APIs so you don't have to write every last bit of the COM boilerplate yourself.