0

I am writing a DOS batch script file. My script will be doing following:

  1. make a directory with mkdir command
  2. spawn a powershell command to a new window ( not the same command window)
  3. I would like to open this power script in a new window
  4. run shell monkey -p com.android.browser in current window

test.bat

mkdir c:\test_log_file
powershell adb logcat >> "C:\Testdata.txt"              
shell monkey -p  com.android.browser

I have a problem spawning a powershell into a new window. How would I open a power shell in a new command window.

Regards,

Magoo
  • 77,302
  • 8
  • 62
  • 84
droigons
  • 255
  • 4
  • 16

1 Answers1

3
mkdir c:\test_log_file
START "Powershell window" powershell adb logcat ^>^> "C:\Testdata.txt"              
shell monkey -p  com.android.browser

The carets (^) are required to escape their special meaning to the command processor. The quoted first parameter is the Window title of the new window. Can be "" if you wish.

Magoo
  • 77,302
  • 8
  • 62
  • 84
  • However, It does not run the "shell monkey -p com.android.browser" command until I kill the Powershell Window. Do you have any idea why ? – droigons Mar 27 '13 at 18:20