Jump to content

Unable to find Shortcut Locations in CLI


EneergE

Recommended Posts

Some shortcuts from C:\ProgramData\Microsoft\Windows\Start Menu\Programs do not appear to be responsive to a CLI "del" or "move."

For an example, "Windows Media Player" by default appears in ProgramData's start menu directory, but the CLI can not see it.

When you attempt to delete or move this shortcut using a CMD window, an error occurs that states that the shortcut does not exist. However, if you browse to the exact same location using Explorer, you can move and delete the file as you wish.

I've been developing some batch scripts to tidy up the start menu after a post install, but this is driving me bonkers. This occurs on Windows Vista, also. On Windows Vista, the "Windows Meeting Space" shortcut can not be removed or deleted using the command line, but it's a piece of cake using Explorer.

I've also checked user specific Start Menu\Programs\ folder and they are not in that location, either. The properties for the shortcut shows ProgramData. I see it with explorer, but CMD can't see it. I, also, launched CMD with Admin privileges.

Does anyone know why the CLI can not see these files, yet Explorer has no problem?

Link to comment
Share on other sites


The CMD Prompt can see the particular file you mentioned!

Try providing us with the exact commands you are issuing, their respective results and an indication of when and how you are running them.

Link to comment
Share on other sites

Ok, was a little busy, but I managed to grab this screen shot of a Vista install where the CMD can not see "Windows Meeting Space".

On Windows 7, I can't remember the exact shortcuts it was that had that problem. I'm pretty sure it was Windows Media Player, though. I could not ever figure out how to remove that start menu shortcut using a script.

post-95661-0-65477800-1308706346_thumb.p

Link to comment
Share on other sites

I know what you are saying now. let me use an example from my system. In my Start Menu, Windows Update shows up, and the properties say the shortcut exists in the path you posted about. However, in that folder (from explorer) that shortcut does not exist.

There are file links between files in some folders, so they actually live somewhere else. Here are some possible locations:

C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu

Instead of Roaming, there may be a Local folder. My PC does not have a Windows folder in Local. Go to C:\Users\Default\AppData to see what you have. The Public folder does not have an AppData folder, or at least (again) my PC doesn't.

Link to comment
Share on other sites

If it's a hard link, instead of guessing the location :whistle: , one could use hlscan.exe ....

This is the 2K version, it should work on later OS versions too (at least it does on XP):

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=289adee4-abb3-4e18-ab07-c77db8654979&displaylang=en

If it's a junction (symbolic directory link) , one can use junction.exe ...

http://technet.microsoft.com/en-us/sysinternals/bb896768

jaclaz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...