![]() |
#1
|
|||
|
|||
![]()
Recently, I found a very weird behavior of Windows XP:
When I drag a file to an exe and drop, that exe's working directory will be automatically changed to "c:\documents and settings\user name" in stead of current directory that exe lies in. If I input that exe's name and its required arguments at console, the above behavior will not happen. Does anyone know the reason. Thanks. |
#2
|
|||
|
|||
If I understood your question, You can Drag and Drop any compatible files, but without any argumment in the file that you want to Drag, the properties or argummnets to run, are always defined by de Drop exe file when it was compiled, and not by the Drag file.
Regards |
#3
|
|||
|
|||
Quote:
was caused by the exe itself. But I finally found that the changing of working directory was nothing to do with the exe file, nor with the argument file that I had dragged. I proved the above conclusion by doing the following experiment: 1. Replace the first byte of that exe's entry point with 0CCh which stands for int 3. 2. Run SoftICE and command "i3here on" so that it will trap the int 3 instruction 3. Run the exe mentioned above by dragging an argument file to it. 4. When SoftICE stops the exe at its entry point, I input some instructions at stopped address like this to call GetCurrentDirectory(): sub esp, 100 push esp push 100 call GetCurrentDirectoryA int 3 5. After calling GetCurrentDirectory(), I check the returning value and find that the working directory has been changed to "c:\documents and settings\user name" |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Advanced IdaPython to change details UI cannot change | chants | General Discussion | 1 | 07-31-2019 15:46 |
quick CRC32 hashing tool with drag and drop support | destr0 | Community Tools | 1 | 05-16-2015 09:28 |
How to add debug directory to an exe file? | jonwil | General Discussion | 1 | 08-11-2006 03:05 |
Relocations Directory | arnix | General Discussion | 3 | 06-04-2005 15:37 |