Current Directory Broken in Vista

24 views
Skip to first unread message

akhil

unread,
Aug 30, 2009, 4:58:07 PM8/30/09
to hoekey
I used to use %c like the Config Example to call a batch file that
launched cmd into current directory and then switch to the current
Drive by parsing the %c string in the batch file like so:

Config:
~_S=Run|cmd.exe /k D:\Progra~1\HoeKey\goto_cur_dir.bat "%c"; Command
shell in curdir

Contents of goto_cur_dir.bat
@echo off
cd %1
%2
if %1=="Windows (C:)" C:
if %1=="Programs (D:)" D:
if %1=="Media and Docs (E:)" E:
if %1 GEQ "D:\" D:
if %1 GEQ "E:\" E:
if %1 GEQ "F:\" F:
if %1 GEQ "G:\" G:

This worked perfectly well under XP but doesn't anymore under vista.

Apparently the path being passed in %c is just the name of the current
folder instead of its complete path. I suppose its because of the way
Vista stores some structures defining the current path.

Is there a way I can fix this?
Reply all
Reply to author
Forward
0 new messages