I want to use an environment variable as a commandline parameter in a debug session.
So Project Properties->Debug->Command line arguments: %TEMP% gives me not the temp path as a parameter rather than the string "%TEMP%".
Of course I could resolve the environment variable to a path programmatically or copy past the correct path.
But I wa...
I'm making installers for windows using NSIS and have a number of custom install options that the user can specify using the command line, for example:
installer.exe /IDPATH=c:\Program Files\Adobe\Adobe InDesign CS5 /S
What I want to do is show these options to the person installing. I can easily enough parse the /? or /help parameter...
I'm writing a perl script that mimics gcc. This my script needs to process some stdout from gcc. The part for processing is done, but I can't get the simple part working: how can I forward all the command line parameters as is to the next process (gcc in my case). Command lines sent to gcc tend to be very long and can potentially contai...
Hi,
I've been working with OpenCV, and some of the example code I've seen uses the following to read in a filename. I understand that argc is the number of command line arguments that were passes, and argv is a vector of argument strings, but can someone clarify what each part of the following line does? I've tried searching this but ha...
Hi,
We have our project build using maven. We try to run our unit test cases in maven build itself and for doing that we need to add DB2 driver jar in the dependency of all the sub projects.
Instead of doing that, we need a solution to specify the absolute path of the jar file as a mvn command line argument to use it in the running of...
In C / C++ (bash, too?) the first command-line argument, argv[0], is the binary filename (prefixed by an absolute or relative path as invoked by the user).
In Perl the first command-line argument $ARGV[0] is the first command-line argument after the path and name of the script.
How can a Perl script get the path and name that was used ...
I have a string containing lots of text with white-spaces like:
String str = "abc xyz def";
I am now passing this string as a command line argument to a perl file using C# as in:
Process p = new Process();
p.StartInfo.FileName = "c:\\perl\\bin\\perl.exe";
p.StartInfo.Arguments = "c:\\root\\run_cmd.pl " + str + " " + text_file;
In t...
Hi!
This is an odd problem, so I have to provide a bit of background. I have a C++ project that I'm working on that I want to clean up a bit. The main issue that I'm dealing with that makes me want to barf is the massive abuse of preprocessor macros that are used in a core component of the project. There's a file with a bunch of #define...
Similar to this thread for C#, I need to split a string containing the command line arguments to my program so I can allow users to easily run multiple commands. For example, I might have the following string:
-p /path -d "here's my description" --verbose other args
Given the above, Java would normally pass the following in to main:...
I need to get access to the msbuild command line parameters (the specified targets and properties in particular) from within the project file being processed. How can I do this?
...
I used the net user command on a friends computer and now I can't access it. Can anyone tell me what the password would be from this line?
net user Username *".password1
thank you
...
Let's say that I have a simple Ruby app where I want the first argument (if any) to specify the environment: TEST, DEVELOPMENT or PRODUCTION (with DEVELOPMENT being the default if no argument is given). For instance,
ruby myapp.rb test
would run it in TEST mode. Also, shorthands should be accepted, so that for instance
ruby myapp.rb ...
I have a Nant script which updates a directory with the latest source code (checked out from the svn repository), then updates Assembly Info and a few other files and does some builds.
I want the working copy which includes all changes made (after the build is run) be made into a tag revision (described in SVN help 4.19. Branching / Tag...
I've seen people write custom classes to more easily handle command line options in various languages. I wondered if .NET (3.5 or lower) has anything built in so that you don't have to custom-parse things like:
myapp.exe file=text.txt
...
Hello - I have to modify an existing ksh script which looks at the command-line arguments using 'shift', and so empties $@, but now want to pass the original arguments to a second script afterwards.
In the mainline case I can do this by coping $@ to a variable and passing that to the second script, but I can't get it to work for quoted...
I have tried to read up on the subject but when I try to run what I thought would be the correct thing it doesn't do what I want it to :)
I have a main program, that should take three mandatory arguments, let's call them t, p and s. Then I have several modules that, as a part of their initialization, also rely on command line arguments....
I want to allow arbitrary command line arguments. If the user provides me with a command line that looks like this
myscript.py --a valueofa --b valueofb posarg1 posarg2
I know that a was passed with valueofa, b passed with valueofb and that I have these last two positional arguments.
I've always used optparse, for which you specify...
Hi
I am trying to create a script listing the names of the files return by a program.
The program is called ShowFiles.exe and it takes to arguments like this:
"ShowFiles opened ..."
so argument 1 is "opened" and argument 2 is "..."
The the result looks like this:
c:\tmp\test1.txt#0 - add default
c:\tmp\test2.TXT#1 - edit defa...
So the problem is, that when I run my basic script that simply mirrors whats is passed in on the command line, the arguments aren't separated in the way I would expect them to be.
the basic code is:
write-host "`$args`[0`] = $args[0]"
write-host "`$args`[1`] = $args[1]"
write-host "`$args`[2`] = $args[2]"
and if i call the script a...
I am making a Java application that is stored in a .jar file and can be launched by opening the jar file either from the command line or from clicking the icon.
For the Mac version of the app, I would like the menu bars to appear at the top of screen in the Mac style instead of in the window (the Windows style). I know this can be done...