As promised I am publishing script that will close Zune and start WPConnect automatically. I have placed this script on my desktop and I start it each time I connect my Windows Phone to computer. Please find script in next part of post.
@ECHO OFF ECHO (c) Michal Jankowski 2012 http://www.jankowskimichal.pl SET %errorlevel% = 0 SET /a counter = 0 taskkill /IM zune.exe IF %errorlevel% NEQ 0 ( GOTO End ) ECHO Closing Zune... PING 1.1.1.1 -n 1 -w 5000 >NUL :ConnectToPhone IF %PROCESSOR_ARCHITECTURE% == x86 ( "%ProgramFiles%\Microsoft SDKs\Windows Phone\v7.1\Tools\WPConnect\x86\WPConnect.exe" ) ELSE "%ProgramFiles(x86)%\Microsoft SDKs\Windows Phone\v7.1\Tools\WPConnect\x64\WPConnect.exe" IF %errorlevel% == 0 ( GOTO End ) ELSE ( IF %counter% GEQ 2 ( ECHO WPConnect can not be started... GOTO End ) ECHO Retrying in 5 seconds... PING 1.1.1.1 -n 1 -w 5000 > NUL SET /a counter=counter+1 GOTO ConnectToPhone ) :End
And whole in file:
Leave A Comment