hiding windows command line args - command-line-arguments

I want to run a windows app (the 'target') from another app (the 'runner')
I dont own the target.
Is there any way I can do this without having the params I pass show up in process explorer (I am passing a password)

Unfortunately there is no way. If I understand well you want to pass a password in CLEARTEXT to the target. The only way to not have it show would be for the target program to look for some file where the password is stored, or to look for some key to read the encrypted password.
I assume that by not owning the target you can't ask for that modification to be made. Your best luck would be looking into the manual of the target app
i hope it was useful

Take a look at this blog post and comment thread. Indicates a method under which one process can get at the command line of another. Could the runner launch the process, then go in after some interval (allowing the launched process to first make use of the command line parameters) and change the command line, so that the reported command line is not the original?

Related

RazorSQL profiles, command line calls & windows task user mixup

They might be quite obscure: i enjoy RazorSQL for all it can do, and it is the only tool i found that talks properly is Clarions's ODBC driver. It also allows for awesome command line calls to export data.
Trouble is: RazorSQL stores profile connection information based on the user that installed it, and when you set a Windows task to run the batch files of all the groovy export commands, the internal batch file fail without external notification because the user is SYSTEM (as we don't want this tied to any one user)..
I do not recall if there was an option on install allowing profiles to be seen by all, as i normally set this to everyone on my dev box (as it is only me).
So the question: has anyone encountered this obscure scenario, and knows how to have RazorSQL look in a generic location for connection details?
RazorSQL checks for system property named "razorPortable". When defined with a value of "portable" it keeps all its stuff in a RazorSQL folder under its main directory, so shared by all users launching it with said property defined.
So you know the drill: edit some of the bundled bat files and add -DrazorPortable=portable to the command line.
You'll need to re-enter yout registration code, connection profiles, preferences, etc. Or you can manually move them.

Platform independent system lock for command line program

I have a library which runs as a command line program. I'd like to give the user the option of setting up a lock so the command line program can't be run twice - that is - if it starts up, it can't be executed again until it finishes, from any terminal session.
The lock should work for any user logged onto a system - I assume we use some atomic operation on a file, but what kind of operation would that be? It has to be failsafe. The user would be able to override the lock with a --force option, in case of some error.
Any ideas on how to implement this without having to setup any third party software?
Potential implementation: Perhaps the simplest way to do it would be to write a file to the filesystem and delete it on program exit. Any program that comes in second will attempt to write the same file and get an EEXIST error.
Try to create the lock file in some shared area and check if it exit before starting
Also make sure the permission on deleting files in that shared are only for a group of admins

Command Prompt and Installer Not Synced

How can I sync the command line to the setup project installer that it will not proceed until the task of the command line is done?
The installer needs to run BATCH scripts and it needs to log on to the database credentials. But even before logging on to the database, the installer still proceeds and finish the installation process.
You could give a bit more context, but in general the answer is don't use bat files. You could have a custom action VB script that runs the external executeables (if that's what they are) and waits for them to finish. In general, whenever bat files show up during an install it's a red flag that something isn't right in the design. Usernames can be entered in UI dialogs at the front, for example, and passed to custom action programs; also many clients like silent installs where property values (like a username) can be passed on the msiexec command line and again get passed into a custom action, and it all just works - I suspect your install cannot be run silently because you are collecting a user name at the end of the install in a custom action.

How to run a specified bat file at particular time ie.. scheduler

I have been using the at command to schedule the task
ex: at 14:45 my.bat
and i am getting the o/p on the command prompt as
"JOB ID is added"
But this command is not getting fired on the time which i have scheduled..
Can anyone please help me.......
I suspect the issue is not that the BAT file is not executing at all, but rather either or both of i) individual commands within the BAT file are failing, or ii) the output isn't getting sent to the place you're looking for it. (Things get even weirder if anything in the batch file requests input, since a) by default batch files may not be able to interact with the "console" at all and b) the system is probably unattended anyway at the time the batch file executes.) If my suspicion is right, there is no one "fix-everything" but rather a whole bunch of small fixes ...and you have to hit every one of them.
Find out the needed password to actually login as 'admin' (rather than your usual user), open a DOS box, and try to run the batch file. There should be some sort of error message that you can see. Fix that problem. Then try again ...and fix the next problem. Keep correcting problems and trying again until finally everything works.

How do I setup a default checkin comment for CVS?

How do I generate a default comment for cvs? I'd like every checkin comment to start with "Change #: " and be available for the user to edit.
I know this can be done globally in the repository. Can it also be done as a single user on the client side?
I am using command line cvs.
We already have verification that the checkin starts with "Change #: " and that a valid change number is provided. I'd like to default the checkin comment to "Change #: " to save developers some typing. How can this be done globally? Can it be done locally/client side?
Be cautious. You must also ensure that the default comment does not become a crutch. For example, you should validate that the defect number is valid (currently open, for example, as well as actually exists). Otherwise, the programmers will simply use the default comment as the only comment.
In my view, it would be better to put the effort into validating the comment than into providing a default. Tell the developers that their changes will be rejected unless the comments meet the requirements - and document what is expected (and accepted).
The questioner challenges "nicely said, but does not answer the question".
Fair enough. I don't really use CVS, so take what follows with a pinch of salt.
Looking at Karl Fogel's book "Open Source Development with CVS" (Coriolis, 1999), I don't see a good way to do it. There are 'commitinfo', 'loginfo' and 'verifymsg' files that all seem to specify programs that validate log messages, and the editor is launched when the user doesn't specify 'cvs ci -m"Why I committed this"' (or, 'cvs ci -F why' for a message in a file), but personally I always checkin with comments on the command line and would hate to have an editor launched for me. So, short of writing a wrapper for the cvs command (which would be moderately complex), I don't see a way in the book of doing what you request.
Hmmm...unless you override the user's definition of CVSEDITOR in a shell script wrapper for cvs with a program that creates the default message in the given file and then launches ${VISUAL:-${EDITOR:-vim}} instead. Ick, and likewise yuck! But, done carefully, it would work. Probably the hardest part is ensuring that the programmers use your script version of cvs instead of the binary.
You can use the rcsinfo file to specify a template to use for the check in.
See this page for details.
This is done server side, so you need your template files on your server.
Also, as noted above, you can override the template with your own check in comments on the CVS command line.

Resources