I've discovered a problem with the current directory in X2 when using multiple windows. I executed a script which assumes the current directory is the folder it was started from. To my surprise, it was executing from another folder!
For purpose of testing a command script (.cmd or .bat, same difference)with the statements
@echo off
cd
pause
is useful
The scenario is as follows:
Open X2 and go to the folder with your script. Executing the script (double click or enter when it has focus) will give you the desired result. It will echo the folder the script is in to the console.
Now clone a new window (through Ctrl-N or the menu, no matter).
Go to a different folder than the one your script is in.
Close the cloned window.
Now execute the script again. It will show the last folder you were in in the cloned window in stead of the folder the script is in!!
I've found that a focus change in the original X2 window will 'fix' the current dir to the correct path. But if you stay in the same folder after closing the cloned window, it will report the wrong current dir, even when you do something else first like viewing another file or deleting some item.
So only a switch to the second pane and back or a change in folders in the same pane will fix the current dir for the script.
It is only a matter of context for a .cmd or .bat file, because other files are openened normally as you'd expect.
Output of DBMON included to be complete. I think it is the statement "Filesystem path = G:\WORD" that does the damage, no??
Regards, Jan.
DBMON output:
3076: *** TID=77c, Generating folder instance '::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\G:\WORD'
3076: Filesystem path = G:\WORD
3076: Shell attributes: (0x7080017f) FILESYSANCESTOR | FILESYSTEM | STORAGEANCESTOR |
3076: Assigned folder type: FITYPE_FILESYSTEM [deciphered]
3076: Folder CLSID: {F3364BA0-65B9-11CE-A9BA-00AA004AE837}
3076: Enumerated 24 objects in the folder, code=1
3076: Delay-creating column handler...IShellFolder2; Columns = 35 (cached)
3076: UWM_VIEWDELAYSORT got rid of 0 redundant messages
3076: SPY(0000009a): Installed on '::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\G:\WORD'
3076: Thread 77c pump: unrecognized message 49454 ignored
3076: Frame_c0358 handling command 32858
3076: Thread 77c pump: unrecognized message 49454 ignored
3076: ThreadID=77c: Destroying frame 0x000c0358 'ATL:ExplorerFrame' [xplorer▓ - [Temp @ C:\...] # WORD @ G:\...]
3076: Thread 888 pump: unrecognized message 49454 ignored
3076: Thread 888 pump: unrecognized message 49454 ignored
3076: <<< SantaThreadID=aac goes back to lapland
3076: <<< ThreadID=77c singing off
3076: max ever windows in spy list was 3
3076: santa_aac: Max ever queue length was 1
3076: Thread 888 pump: unrecognized message 49454 ignored

