I'm looking for a way to run a cmd command without showing the cmd window to the user.
I'm using something like:
function reboot() {
var ws = new ActiveXObject("WScript.Shell");
ws.Exec("shutdown.exe -r -t 120");
}
But it still shows the window, is there anyway not to show it?
Thanks
...
hi,
I would like to have some kind of starter-batch for my *.jar file, but therefore I need the current folder path.
How do I create a batch that can get the folder path, the batch and the jar files are in and then using this path for the jar-command in the command-line?
Thank you in advance for any hint! Andreas
...
How can I change the appearance of my current CMD window?
I know there is a 'mode' and 'color' commands that give you some control, but it's not enough...
Is it possible to change Screen Buffer Size separately? To turn QuickEdit mode on/off?
Is there an API for this?
...
I can read now the last line from the FFmpeg procees executed in a cmd window.
with this source using Scripting host model object reference.
Private Sub Command1_Click()
Dim oExec As WshExec
Dim sRow As String
With New WshShell
Set oExec = .Exec("ffmpeg.exe")
End With
Do While oExec.Status = Wsh...
This is my code so far:
for /f "tokens=1 eol=," %%f IN ("1,2,3,4") do (
echo .
echo %%f
)
I'm expecting that to produce:
.
1
.
2
.
etc...
But instead I get:
.
1
And that's it. What am I missing?
...
I've created a batch which automatically uploads some files to FTP server, if they're modified. And modification is detected by changed file's modification time and size.
But if the modification is made within the same minute, and file size did not change, modification stays undetected, and file is not uploaded. Is there a way to get exa...
So I'm using this command to copy only txt files from a certain directory to another directory
for /R c:\source %%f in (*.xml) do copy %%f x:\destination\
But it only copies over the text files without a space in the name, so it copies test.txt but not test 2.txt. How do I make it so it copies txt files with spaces?
...
D:\TDDOWNLOAD\WWW1\pyinstaller>python Makespec.py C:\Documents and Settings\Admi
nistrator\桌面\a.py
wrote D:\TDDOWNLOAD\WWW1\pyinstaller\Documents\Documents.spec
now run Build.py to build the executable
D:\TDDOWNLOAD\WWW1\pyinstaller>python Build.py D:\TDDOWNLOAD\WWW1\pyinstaller\Do
cuments\Documents.spec
Traceback (most recent call last...
Hi, I'm trying to write a small app which can be used in order to log off Citrix Sessions.
Citrix Sessions can be logged off via cmd or a batch file using this method:
@echo off
echo "Enter username"
set /p UserName=
echo 001
query user %username% /server:server1
echo 002
query user %username% /server:server2
echo 003
query user %user...
Hi, so I've tried Process and starting a cmd.exe and send commands directly to that window. And then picking up the values written to the cmd.exe window.
The code looks like this:
Dim arrServers As ArrayList
Dim s(ListBoxServers.Items.Count) As String
ListBoxServers.Items.CopyTo(s, 0)
arrServers = New ArrayList(s)
Us...
I'm writing a DOS batch job to review two different directories, identify files with like first six characters, and then move both the matched files to a third directory. I'm getting a syntax error on the following code. Any suggestions?
File 1:
set CopyCount=0
for %%f in (??????*.tif) do call ..\MatchMove1.bat %%f
cd ..
if %Copy...
The following mostly works. 'Mostly', because the use of the SOMETHING..\tasks\ pathname confuses Spring when a context XML file tries to include another by relative pathname. So, what I seem to need is a way, in a BAT file, of setting a variable to the parent directory of a pathname.
set ROOT=%~dp0
java -Xmx1g -jar %ROOT%\..\lib\ajar.j...
Hi All,
I want to assign the alpha numeric value to one variable in Batch scripting.
I tried following one but getting error.
setlocal
set test = \765514e2aad02ca658cc56cdb7884947 *E:\\test1
echo %test%
endlocal
Error:
C:\Users\bgannu>setlocal
C:\Users\bgannu>set test = \765514e2aad02ca658cc56cdb7884947 *E:\\test1
C:\Users\bgannu>...
Hello!
I'm trying to delete some files with unicode characters in them with batch script (it's a requirement). So I run cmd and execute:
> chcp 65001
Effectively setting codepage to UTF-8. And it works:
D:\temp\1>dir
Volume in drive D has no label.
Volume Serial Number is 8C33-61BF
Directory of D:\temp\1
02.02.2010 09:31 <D...
@echo off
for /f "tokens=1,2 delims=," %%x in (my.csv) do (
if %M% LSS %%x set M=%%x
)
echo Max X Value= %M%
Sometimes it works fine, sometime not with following error!!
%x was unexpected at this time.
...
I'm trying to use cmd.exe to search for a file in a specific directory and then display the path in a java program and write it to a file. The problem is that the process never terminates.
Here is my code:
String[] str = new String[] { "cmd.exe ", "cd c:\\",
" dir /b /s documents", "2>&1" };
Runtim...
I am trying to read in the results of a cmd command (dir for example). After creating the process, I use a BufferedReader in conjunction with an InputStreamReader. For some reason, the BufferedReader keeps coming up empty, even though I know that there must be some output to be read.
Here is the code I'm using:
String[] str = new Str...
I am using the LAME command line mp3 encoder in a project. I want to be able to see what version someone is using. if I just execute LAME.exe with no paramaters i get, for example:
C:\LAME>LAME.exe
LAME 32-bits version 3.98.2 (http://www.mp3dev.org/)
usage: blah blah
blah blah
C:\LAME>
if i try redirecting the output to a text file ...
I'm trying to install this TransitFeedData command line program and it seems that I don't have any of the programs to install this program with.
http://code.google.com/p/googletransitdatafeed/wiki/TransitFeedDistribution
It says to do this:
python2.4 setup.py install
but it doesn't work.
Help!
...
Apologies my french english ...
I would like to create an alias in Windows XP cmd, like Symfony.
This code works perfectly, but resets every system boot :
doskey kCLI= php C:\wamp\www\KinkamaCLI\KinkamaCLI.php
I tryed to put a .bat in "start" folder, but I think it's not beautifull, and I feel it doesn't work, because I can't see th...