Ok, so I'm a noob at DOS and cmd.exe stuff (also scripting/programming in general). I'm working on a WinXP machine atm.
Editing the "Command Prompt Portable" .bat inspired me to learn a bit more. Any help with the following will be appreciated. Pointers to specific websites if it's not a quick answer, please. I've searched the forum for about 2 hrs and came up with nothing that helps ... although I found lots of interest... lol
Question 1) How do I get a cmd consule to stay after I dbl click a .bat file? i.e. not just open run and close? (I thought from reading EXIT /? that "EXIT /B" at the end of the .bat might help but it didn't)
Leading on from that ... And a little about my current intentions.
What I want is to take it out of the "portable" environment so that I can have my own customised cmd window on my pc (additions to path, etc). What I don't want is too, run cmd.exe and then run a .bat file, to get the same effects as "Command Prompt Portable". Having it work in win98 and XP is important too.
My aim is to have all my Portableapps on a CD, from which I can then run a .bat to set up a new flash disk with minimum input. Essentially a portable "portableapps" disk maker. hehehe. Also Allowing me to select variations. eg General, recovery, media, etc. After quite some time I have the apps install from .bat files individually. (Learning as I went, piping the help for commands to text files was really useful here. i.e. "color /? > color.txt")
Using the supplied PeaZip (really cool!!) I extracted the "CommandPromptPortable.exe" from the install. Running this on it's own creates data, etc directories. Which is a bit untidy. And changing the folder attribute to "read only" didn't work to stop their creation.
Not wanting to re-invent the wheel ... ie create a new "CommandPromptPortable.exe" (the learning curve is far to steep, and this is a "hobby". I'll stick to my simple batch files for now)
At the moment these are the questions that are bugging me.
1) Where did the "CommandPromptPortable.exe" come from or what is it based on. Maybe I can adapt it or find similar that'll better suit me.
2) Can I easily change the "CommandPromptPortable.exe" behaviour? Please note, compiling and various other programming terms are foreign to me and I can't read the NSIS code.
Something else I'd like to be able to do is ... add the "Command Prompt Portable" to the right click menu of "Explorer" a la "Command Prompt here". https://portableapps.com/node/14421 looks like it might help ... but I'm a long way off from there atm.
Please no vague "just google it" suggestions ... the volume of info is overwhelming and I have no idea what the correct terms, etc to be looking for. I've spent hours going through DOS doc's. And plan too spend more ... Some immediate help with or reference for the above is what I'm after here.
Also any reference you may have found useful concerning my aims above.
Okay. This might be long, but I can't really point you to a site for it so you'll just have to bare with me.
First of all: You could keep it open by adding "command.com" or just "command" to the end, but that would leave it in oldschool mode, which isn't very good. (Sidenote, if the order seems weird, it's because I'm not typing it in order. Does that even make sense? Whatever.) I have a batch down below as an example of a customized DOS, and in it I solve the problem by having it start itself in a new window, then changing things. The original window closes, but the new one doesn't.
If you want a custom banner, colors, etc. on your own PC, you don't even need an exe file. Just make a good batch, and either use it, or a link to it. (You can hide the batch, even going as far as making it a hidden-system file, and use a shortcut to edit and run it) Mine looks like this (actually I don't use one, but I might fiddle around with this one a little and start using it)
It works fine, and you don't need a program to start it for you.
If you insist on using an application, CPP isn't really very useful. You're better off just using a simple C program. Does pretty much the same, and takes up less space. You can even give it an icon with ResHacker. If you can figure out how, I could give it to you. (I've never sent programs on the internet lol. All I usually use is DOS and HTML. Which are both text-based.)
"Where did...CPP...come from..."
As far as I can tell, all it really does is launch that batch file. Which, as I've already said, a simple C program can do just as good a job of. All you need an exe for is launching the batch from the PortableApps menu, because you can only launch exe files from there. Other than that, it seems pretty useless to me :/
I probably missed some questions, it's like 2 am *yawn* so if you need any more help, with this or any DOS, just ask. (I know some really awesome tricks)
------------------------------------------
"When you always know what is right, where is freedom? No one chooses the wrong, Jacen Solo. Uncertainty sets you free."
Maybe you should research what it does and what else is included first. The launcher is only about 70K and, unlike yours, it optionally lets an end-user update the completion character in the registry back and forth to temporarily enable auto-complete on machines where it is off and to also be able to start in a specific directory when started up from FreeCommander or other utilities. The rest of the files are for PortableApps.com Format (appinfo.ini and appinfo.ico), help files and associated images and the source code for the launcher and for the multilingual installer. All together it comes to 294K.
Adding it to the Explorer right-click menu is a bad idea and causes portability problems.
In the future, please make a SINGLE forum post about an issue you'd like to discuss. You triple-posted your original complaint as a post here, a comment in another forum thread and a comment on a news story before I removed the other two.
Sometimes, the impossible can become possible, if you're awesome!
Yeah, sorry about that. I did research CPP a little, but obviously not enough. Did I really post on it three times? I must've really been tired. So that's what the other files are for. A lot more uses than my crappy 6 line C program.
Also, "Adding it to the Explorer right-click..."? I'm not sure what you mean there...
Also also, DoesFreeCommander work with PortableApps?
Thanks again, and sorry again.
------------------------------------------
"When you always know what is right, where is freedom? No one chooses the wrong, Jacen Solo. Uncertainty sets you free."
No problem, just ease up on posting if you find another issue
The right-click context menu was what I was referring to. In regular windows explorer adding an "Open Command Prompt Here" shouldn't be done with a portable program as you have to kill explorer and restart it when you remove it.
FreeCommander has a package in PortableApps.com Format with our permission. Command Prompt Portable can be launched from FreeCommander to enable you to easily open a command prompt from a specific directory.
Sometimes, the impossible can become possible, if you're awesome!