I had a simple batch file I would use in Windows XP to create a set of specific subfolders inside a folder. I had it set up as a Right-Click context menu so that when I right-clicked on a folder within Windows Explorer, I could execute the batch file and have the 10 specific folders created inside it.
I moved the same batch file to Windows 7. I can run the batch file manually and it works fine, however when I run it from the Right-click context menu, the folders are all created in the \Windows\System32\ directory, not in the colder that I had right-clicked upon.
I know that the "Current Directory" in Windows XP used to carry the value of the right-clicked folder, now in Windows 7 the Current Directory value seems to change to the System32 folder.
I was trying to find a way to read the current directory that the mouse right-clicked on, but cannot find that value. "CD" is the System32 folder at the start of the batch execution.