Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 11,386 Posts 4,938 Joined 2006-07-23 17:10 19-year member UID 59080
Status Offline
Originally posted by byxyk at 2007-6-28 21:15:
The parameter %0 is not always the same.
1. Double-click execution in Explorer
2. Run with full path in CMD
3. Run in the current directory in CMD
Credits 5,310 Posts 2,044 Joined 2005-09-26 12:00 20-year member UID 42843 Gender Male From 四川南充
Status Offline
Originally posted by graper at 2007-6-28 18:58:
The above one can work when run directly in BAT mode, but it doesn't work when compiled into an EXE file with a tool; the path will become the path of the system temporary directory :(
Moreover, if I only want to get the upper level of the current file ...
Generally speaking, when an EXE file is compiled with a tool and then run, the EXE file will automatically decrypt the BAT file, and the decrypted BAT file will be placed in the system temporary directory, so the path will become the path of the system temporary directory