You are here

CommandPromptPortable 1.0.1beta (maybe)

25 posts / 0 new
Last post
rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
CommandPromptPortable 1.0.1beta (maybe)

I wanted one more level of customization in CommandPromptPortable -- Filename and Path completion. (It defaults to "off" on many machines.) So I decided to modify the existing CommandPromptPortable to provide that.

I tried to follow the version 1 source as much as possible.

The way it works is: it reads the two settings from an ini file, updates the registry before executing cmd.exe, then puts the regisry back the way it was. When it first runs, if there is no ini file, it reads the current settings from the host machine and stores them in the ini file.

I'm not sure what the version numbering around here is like. It's not a huge change.

I am not real confident about how this works on win95 and its ilk, or NT4. Anyone able to try it out?

Feel free to make lots of suggestions.

[download site withdrawn; if you want to see a copy, let me know]

Espreon
Espreon's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2006-09-29 18:23
I hope you removed the splash and all the other TMed stuff

or John might blow you down.

--
As all of ya should know Micro$oft is the Evil Empire, and Windows (a.k.a. Winblows or Windoze) is their greatest general, so please make a difference and install Linux or FreeBSD on yer Windows comp.

rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
No splash on this one

(as you would have seen if you had tried it Blum ) and besides, it is offered to him in case he wants to use it.

Maybe we should think about a standard compiler switch that creates unofficial or beta versions with different visual identity and trademarked phrases; that way we could create testing or mod versions for John's consideration that are obviously not "official", but wouldn't require a whole lot of testing to put into "official" format.

Or does something like that exist already and I've just missed it?

MC

Simeon
Simeon's picture
Offline
Last seen: 10 years 1 month ago
DeveloperTranslator
Joined: 2006-09-25 15:15
No it doesnt exist

but I like the idea.
“I can live with doubt and uncertainty and not knowing. I think it is much more interesting to live not knowing than to have answers that might be wrong.” - Richard P. Feynman

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

Patrick Patience
Offline
Last seen: 4 years 11 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
I like the idea as well.

I was thinking of modding the Command Prompt Portable launcher to check the OS, and if it's a linux machine, it would launch the Terminal. (i just wanted to figure out what the simplest way to launch the terminal was, because each linux distro usually has a different program for it).

______________________
Signature...What Signature?

Zach Thibeau
Zach Thibeau's picture
Offline
Last seen: 2 years 1 month ago
Developer
Joined: 2006-05-26 12:08
Well

With FreeBASIC you can make it possible. Since I can make launchers in windows it is possible to cross compile to linux because FreeBASIC has a linux version too
-----------------------------
"I don't fear Computers. I fear the lack of them" Isaac Asimov
My Personal Blog in the making at a new address thibeaz.com Biggrin

your friendly neighbourhood moderator Zach Thibeau

Patrick Patience
Offline
Last seen: 4 years 11 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Yea...

Is it not possible with NSIS as well?

______________________
Signature...What Signature?

Zach Thibeau
Zach Thibeau's picture
Offline
Last seen: 2 years 1 month ago
Developer
Joined: 2006-05-26 12:08
Well

I don't think so as nsis is really compiled to fit the specifications of a pc running Windows and not linux. Unless some modifies NSIS to run linux executables, It's really impossible afaik
-----------------------------
"I don't fear Computers. I fear the lack of them" Isaac Asimov
My Personal Blog in the making at a new address thibeaz.com Biggrin

your friendly neighbourhood moderator Zach Thibeau

Patrick Patience
Offline
Last seen: 4 years 11 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
True.

I didn't think about Linux executables.

_______________________________________________
Wow, I just noticed I still had a signature, that's enough of that.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 month ago
Joined: 2006-01-06 21:27
.

Think about the complexity you'd have to add either to each launcher for that, which is a lot, or recompile NSIS, which we certainly aren't doing. To do it yourself, just replace the splash screen. Done. Simple.
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

"If you're not part of the solution, you're part of the precipitate."

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 11 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Few Things

1. NSIS is for Windows binary installers only. It can compile on Linux but there is no NSIS for *nix.

2. Binaries running within Wine can not launch Linux apps, so it can't bring up a terminal window.

3. Is it really necessary to make this launcher a lot more complicated (and probably have additional support requests about how to set the auto-completion key)? Auto-completion is on by default on all Windows XP and up installations and most people don't disable it. And, even if it's not, you can type cmd /f at the command prompt to enable it (or add it right into your Command Prompt Portable's batch file). The only thing this addition would gain is the ability to use command prompt completion on Windows 2000 (where it is supported by off by default). It won't affect 95/98/Me/NT since they don't support command completion.

Sometimes, the impossible can become possible, if you're awesome!

Patrick Patience
Offline
Last seen: 4 years 11 months ago
DeveloperModerator
Joined: 2007-02-20 19:26
Shucks.

It would have been fun if it could launch the terminal. Smile

_______________________________________________
Wow, I just noticed I still had a signature, that's enough of that.

Espreon
Espreon's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2006-09-29 18:23
Yeah.....

" "
--
As all of ya should know Micro$oft is the Evil Empire, and Windows (a.k.a. Winblows or Windoze) is their greatest general, so please make a difference and install Linux or FreeBSD on yer Windows comp.

rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
defaults

On my Windows XP machine, the help message for cmd.exe says "File and Directory name completion is NOT enabled by default." Maybe it is lying?

It also says that the default when you just turn it on with /f:on is ctrl-F and ctrl-D. My fingers prefer Tab, because that's what bash is set for. The only way to set that is in the registry, according to the Help message. (TweakUI can do it, but I don't really want to go there...)

I was tempted while messing with the registry to keep the setting for Quick Edit too, but that can be set in the properties dialog.

So you see, I thought I was adding something that was not possible any other way -- having a preference for completion character. Setting the character to something other than space also turns it on, so that is a side benefit...

MC

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 11 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
It's On

It's on by default on Windows XP installs. I just checked my base install of Windows XP that I use for testing (just Win XP installed and then fully updated... no additional apps or other changes). In a default commandline instance, completion is on and uses the TAB character.

Oddly cmd /f just seems to turn it on and use CTRL-F even if it's already on and using TAB.

Sometimes, the impossible can become possible, if you're awesome!

Bahamut
Bahamut's picture
Offline
Last seen: 12 years 11 months ago
Joined: 2006-04-07 08:44
Perhaps older XP

Perhaps older XP installations had it off by default and SP1 or SP2 has it on by default. My home machine had it off, but I turned it on, and it uses Tab.

Vintage!

rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
Support issues

As far as support is concerned, we're talking about a Command prompt here. If they can use the command prompt, they shouldn't need much support...

There are two settings in an ini file. There are examples of the most common variations for people to copy.

The initial setup is such that it copies whatever is on the first machine, theoretically the home machine. If the person has figured out how to set up that preference (TweakUI or a registry setting), it will be copied for her.

So: support can consist of "unplug your USB drive; set up the completion characters the way you like them and test; insert the USB drive; delete the commandprompt.ini file in the .\data directory; run CommandPromptPortable to copy your preferences." If they don't have a preference set up on their home machine, then they shouldn't be worrying about taking it with them on the road. Blum

MC

rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
Defaults

I've done some snooping around, and it appears that the CompletionChar is set to tab on XP and later machines, with PathCompletionChar not set. My changes didn't anticipate that PathCompletionChar would not be set, so I'll need to fix it so it puts things back the way it found them.

I guess the question would be, does John H. want me to work on it more, or should I just take it down and go on to another project?

It currently is good enough for me, but before it gets released it needs a bit more work.

No hard feelings if John doesn't want it changed. I've got what I need, and learned a lot about NSIS in the process.

MC

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 11 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Dunno

To my knowledge, you're the only one that ever even asked about it, so I don't know if anyone else would use the feature. I'd say hang onto your code and if a few people ask, we'll put it through its paces and add it or a variant of it in.

Sometimes, the impossible can become possible, if you're awesome!

RossGoodman
Offline
Last seen: 3 years 4 months ago
Joined: 2005-12-19 12:51
Complete Replacement?

Maybe off thread but I'll ask anyway.

I know that this is simply a wrapper around the existing cmd.exe app.
On my current site, running of this is disallowed via a group policy.

I know that the existing M$ cmd.exe could not be distributed as it is not open source. Does such a thing as an open source command prompt REPLACEMENT exist?

Or am I just being stupid?

John T. Haller
John T. Haller's picture
Offline
Last seen: 5 hours 11 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Off-Thread

Definitely off-thread. And, no, not that I know of. Everything I've seen is just a wrapper for it (including Console which is mentioned in another thread).

Sometimes, the impossible can become possible, if you're awesome!

rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
alternative

Funny, I was thinking I might look at one of the sh programs (native win32, not cygwin) to see what they might be like as an alternative. I think I recall that some depend on CMD.EXE somehow, but maybe others don't.

I think I recall hearing of some geeks using Perl as their shell. Or maybe it was emacs. Have you thought of trying that? Blum

If the computer is locked down to the extent of prohibiting CMD.EXE, you should probably not challenge them with alternatives. We wouldn't want you or PortableApps to get a bad name.

On the other hand, that locked-down machine should be a good one for testing, to see what those restrictions do to the PA platform, with a view toward eliminating proscribed behaviors where possible.

MC

RossGoodman
Offline
Last seen: 3 years 4 months ago
Joined: 2005-12-19 12:51
open and honest

I think of myself as an IT professional.

When I am working on site I make no secret of the fact I use portable apps.
I have even converted some customers to use some products.

I am loathed to even try and "learn" a new shell (perl etc) this post was just triggered from trying to get this https://portableapps.com/node/9227 to work.
Apache was erroring out, but I could not see stdout as I could not get a command shell.

Aside from that I have had no problems running portable apps on locked down PC's.

Ross

rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
sorry

I didn't mean to offend.

If a workstation is locked down to the extent of not allowing cmd.exe to run, that should probably be the end of it. It would be improper to try to get around the restriction.

My mention of other shells was mostly intended to be humorous. I don't really think they would work in a restricted environment, although it might be interesting to see ... on my own locked down machine, not someone else's.

There are some advantages to using a different shell, if one is familiar with it. That would be the other reason for experimenting to see what it would take to set up an alternative to be available when running PortableApps.

Autoit and some other compiled scripting languages might give you access to stdout without going through cmd.exe (someone more familiar with it than I would need to say). Or maybe the Launcher for the app that isn't working could accept a parameter to tell it to save lots of error information to a log file, including any stdout or stderr it can intercept. But that's just speculating. I wouldn't be surprised if cmd was used in the background for that on normal machines...

Sorry.

MC

RossGoodman
Offline
Last seen: 3 years 4 months ago
Joined: 2005-12-19 12:51
No offence taken !

The point I was highlighting was that a lot of the general comments are about doing things "under the radar". I prefer to highlight how useful PA can be.
Just today a customer was complaining about not being able to FTP from his new PC, 30 seconds later......
It would be "interesting" to see if a sell replacement could be made portable, eg, copy a perl folder onto my USB. Downside is I have not written anything in perl in about 10 years !!!!

Log in or register to post comments