|
|
Probably not the most useful thing but I'd thought I'd point it out. You can use relative paths in command prompt like ., .., or \ as a directory with Compatibility Sword. Watch the directory open up for you in a new command window. You might even be able to use variables which is great, say in batch programs. Pretty useful when you need to do tasks that require mutliple windows. I was going to add this functionality through some additional switches but apparently Windows does it for us.
Quick breakdown for us that don't mess around with command prompts too often:
. = current directory
.. = parent of current directory
\ = root directory of the drive of the current directory
So here's what I'm thinking... wouldn't it be cool to have a way to open a new command prompt window that would be elevated from the current directory in the command window you forgot to elevate? Thanks to Compatibility Sword and Windows playing nice this is quite easy.
You'll need Compatibility Sword 2.0 or later for the following to work correctly. Drop Compatibility Sword in your c:\windows\system32 directory or in 2.1 or later click the "Make System Command" link in the user interface. All done! Now to use...
csword . /uac
Simple enough right? You can toss out the /uac switch if you just want another window. CSword's now a system command, which means you can just refer to it as csword ... in command prompts or csword at a run dialog/creating new shortcuts regardless of directory that you may be in. It'll make it much easier to write batch files that use CSword to carry out application compatibility tasks as well. Any user (including non-admin users) well be able to use it (since everyone should have at least read access to the system32 directory).
Categories: Tech, 2009 Blog Posts
Coolname007 says...
And perhaps the directory feature's default directory opened in the file browser could be system32.
kairozamorro says...
CSword's a portable GUI and command line utility in one. There is no separate command line and GUI versions.
kairozamorro says...
I may include an option in the GUI to make it a system command for you, but generally its not a good idea to have programs start copying over stuff without user permission. Because 99% of the tasks CSword performs doesn't require admin privallages its necessary to throw in the /uac switch if you want an elevated command prompt. Even with that its a lot quicker then having to go hunt down an admin command window to the directory you want.
kairozamorro says...
Don't know what you mean. There's a /dir switch that opens file browser to current directory. Is that what you're talking about?
Coolname007 says...
I haven't tried CSword from Vista yet, but I'm assuming when you open a command prompt from it, its elevated? If not, you'll definitely want to consider it.
kairozamorro says...
Don't know what you mean. There's a /dir switch that opens file browser to current directory. Is that what you're talking about?
kairozamorro says...Well, I guessed that much already, since I didn't see any separate executable file included in the download, but perhaps you could make a separate command-line version? I don't know...just a thought.
CSword's a portable GUI and command line utility in one. There is no separate command line and GUI versions.
kairozamorro says...Don't you think its better to have it automatically open an elevated command prompt every single time, from the GUI, when you're using it in Vista/7?
I may include an option in the GUI to make it a system command for you, but generally its not a good idea to have programs start copying over stuff without user permission. Because 99% of the tasks CSword performs doesn't require admin privallages its necessary to throw in the /uac switch if you want an elevated command prompt. Even with that its a lot quicker then having to go hunt down an admin command window to the directory you want.
kairozamorro says...Run option. I was wondering if you could change the default directory it opens to, to the system32 directory.
Don't know what you mean. There's a /dir switch that opens file browser to current directory. Is that what you're talking about?
Coolname007 says...
Don't you think its better to have it automatically open an elevated command prompt every single time, from the GUI, when you're using it in Vista/7?
Coolname007 says...
Run option. I was wondering if you could change the default directory it opens to, to the system32 directory.

Coolname007 says...
Ok, now its getting a little annoying...
Now the comment thing just put a new comment I posted at the top of my last comment (and truncated some of it again).
Run option in Csword, i.e. the file browser that opens up. I was wondering if you could change the default directory of that to the system32 directory.
kairozamorro says...
Ok, I think I get what you're saying.... thing is, I would also haft to default to elevate to get it the way you want it right? Ok, two options then....
kairozamorro says...
If you didn't specify a directory sysdir is assumed and elevated instead of displaying an error.
Or most likely choice...
I create a new button there that pre-fills and runs it for you in one click.
kairozamorro says...
If that's why you need it its not needed. Just like CSword when copied to sys directory, you can run any command-line app in the system32 directory simply by referring to it (you don't haft to type full path regardless of what the current directory is). You do this all the time whether you realize it or not. For example, defrag, chkdsk, diskpart, bcdedit, etc. You never type "c:\windows\system32\chkdsk.exe c:", you just type "chkdsk c:".
If you have it open the Application file browser at the system32 directory by default, then all you have to do to start a command-line utility located in there is scroll down, select it, and click the Run button.