All Questions
Tagged with parameters windows
20
questions
3
votes
3
answers
5k
views
What's a correct way for a batch file to run itself with params?
I have a batch file. In which, I need to start another copy of itself in a new window with a parameter. I tried the command start "" "%~0" "Param" but it said '"Param"' is not recognized as an ...
3
votes
1
answer
6k
views
Is /min a valid switch for cmd.exe in Windows?
I'm looking at a few batch files (.bat), and they use use /min as a switch for cmd.exe. Looking at several references, I don't see /min as a parameter for cmd.exe.
Is /min a valid switch for cmd.exe ...
3
votes
1
answer
2k
views
how to shift all parameters in a batch
The well-know shift command can be used to shift positional parameters in batch file, BUT it does not affect the special variable %*.
The shift command has no effect on the %* batch parameter.
Is ...
2
votes
1
answer
682
views
How, exactly, is ! meant to be used with 7-zip CLI parameters?
The -i and -x parameters of the 7-zip CLI interpet ! in a special way. Or at least it looks that way from their documentation. That documentation includes the following:
Syntax
-i[<...
2
votes
2
answers
4k
views
Create Powershell Alias w/ a Function incl. Parameters
UPDATED-STATEMENT: 20190815@000000@THU Working on creating a powershell initial profile for current user only and without running as admin that is authorized to run commands from from the ps-...
2
votes
1
answer
392
views
SHIFT command does not work on %*
When using the SHIFT command to shift the script parameters one position down, I can see the values shift by echo-ing the %1 parameter:
:: scr1.bat
echo %*
echo %1
shift
echo %1
Then:
> scr1.bat ...
1
vote
3
answers
6k
views
How to receive a parameter in a batch file
I have asked a question, Use an environment variable to point to an "Open With" program, which received a fantastic answer.
To add myapp.exe, residing in %MYAPPSDIR%, to the Open With ...
1
vote
1
answer
149
views
Windows Shell integration parameters
I'm trying to integrate a shell menu entry for all files (*) to encrypt them using a tool i already have made.
I have managed to create the entries but I don't really understand how to send the path ...
1
vote
2
answers
31k
views
Change Directory in Windows Batch Script
Based on some other answers I found, I can loop through available drive labels. However, I can't seem to change to that drive:
for /f "skip=1 delims=" %%x in ('wmic logicaldisk get caption') do (
%%x
...
1
vote
0
answers
292
views
How to properly escape in windows command shell - even the asterisk?
By following good (though sometimes conflicting) advice such as
Quotes, Escape Characters, Delimiters - Windows CMD - SS64.com or
Escape character – Wikipedia, section 2.6 Windows_Command_Prompt or ...
1
vote
0
answers
689
views
How should I adjust my monitor display timing parameters to achieve a horizontal offset?
I have a 2560x1440 31.5" monitor that recently stopped displaying in the rightmost 4" of the display. This corresponds to ~320 pixels of dead space, so I am trying to create a custom ...
1
vote
0
answers
828
views
How to create a Windows shortcut that passes the current folder as a parameter
In Windows 7-10, how can you create a shortcut that uses the current folder (directory) as a parameter?
For example:
Target: example.exe "%CD%"
(where %CD% gets automatically replaced by the ...
0
votes
1
answer
809
views
What are the command line parameters (options) for Microsoft's CMTRACE tool?
The CMTRACE tool is included in Microsoft's System Center 2012 R2 Configuration Manager Toolkit.
It's a reasonably good tail tool. One of its downsides, however, is that it can take a very long time ...
0
votes
2
answers
845
views
How to start SpiderOak from a command line in a headless mode and then close cmd?
I'm trying to start SpiderOak in a headless mode from a command line on Windows 7. After the application starts I would like to be able to close the command line without interrupting the process.
...
0
votes
1
answer
2k
views
Starting Adobe Acrobat without toolbar and side panes
I found that it's possible to start Acrobat without toolbar with the following command:
Acrobat.exe" /A "toolbar=0" "%1"
and that it's possible to hide the navpanes with the following:
Acrobat.exe" ...