Navigation |

July 13, 2009

Run Windows batch script minimized

The code below that will force a Windows batch script to run in a minimized window. Insert it at the beginning of the script:
if not "%minimized%"=="" goto :minimized
set minimized=true
start /min cmd /C "%~dpnx0"
goto :EOF
:minimized
rem Anything after here will run in a minimized window
It works by having the script re-launch itself in a new minimized window. [...]

Filed by Paul Gu at July 13th, 2009 under Windows
No comments on this post yet

April 3, 2008

Change the DOS Prompt Color in a Batch File in XP

Grab the user’s attention if a batch file running underneath Windows XP’s DOS fails by changing the text color.
If you need a batch file to really grab your attention, such as when an error condition occurs, try changing the DOS prompt’s colors.
The COLOR command changes the colors of the DOS prompt text and (optional) background. [...]

Filed by Paul Gu at April 3rd, 2008 under Windows
No comments on this post yet

April 2, 2008

Dos command run background

Usually we run a command in dos, it stays peacefully until it is complete. You cannot run any other commands during the process unless you open another command window.
For example, ftp bla bla bla, then you will be in ftp session.
If you change that to
start /min ftp bla bla bla or start /max ftp bla [...]

Filed by Paul Gu at April 2nd, 2008 under Windows
No comments on this post yet

February 14, 2008

Customize Windows Command Prompt To Look Like A Bash Shell Prompt

I use both Linux and Windows Computers at work and have a need to use the command prompt on Windows. By default, Windows command prompt displays the current directory path. One problem with this is when you switch to a directory that has a long name, the prompt can end up half way across the [...]

Filed by Paul Gu at February 14th, 2008 under Blogroll
2 persons have commented this post

January 6, 2008

How to delete GPT Protective Partition

In Windows XP Professional, if you cannot access or modify GPT disk, you can convert a GPT disk to MBR by using the clean command in DiskPart, which will remove all data and partition structures from the disk.
1. You might see S2VR HD 5 Drives in GPT status.
2. Go to DOS command line (click on [...]

Filed by Paul Gu at January 6th, 2008 under Windows
399 persons have commented this post