This repository has been archived by the owner on Oct 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ISETool.bat
101 lines (87 loc) · 2.43 KB
/
ISETool.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
@echo off
set device=
title ISETool Batch Menu
:start
cls
echo.
echo ISETool Batch Script:
echo =====================
echo Please enter your project name and path
echo where you would like to save the isolated storage snapshots
echo If you do not provide a saving path.
echo The default value will be used C:\YOUR_PROJECT_NAME.Storage
echo =====================
echo.
if not exist Properties\WMAppManifest.xml goto error
xml sel -T -t -m "//App" -v "@ProductID" -n Properties\WMAppManifest.xml > productID.txt
xml sel -T -t -m "//App" -v "@Title" -n Properties\WMAppManifest.xml > title.txt
set /p id= < productID.txt
set /p title= < title.txt
set id=%id:{=%
set id=%id:}=%
set title=%title: =_%
del productID.txt
del title.txt
set /P savepath=Please, enter where to save snapshots^>
if %savepath%.==. set savepath=C:\%title%.Storage
echo EnumerateDevices
call:enumerate EnumerateDevices
set /p d=Select device to get Isolated Storage from:
set device=deviceindex:%d%
:home
cls
echo.
echo Device Index :: %device%
echo Project Name :: %title%
echo Product ID :: %id%
echo.
echo Select a task:
echo =============
echo t) Take snapshot
echo r) Restore snapshot
echo l) Emulator Storage - List files/directories
echo e) Exit
echo.
set /p query=Type option:
if "%query%"=="t" goto tsxd
if "%query%"=="r" goto rsxd
if "%query%"=="l" goto dirxd
if "%query%"=="e" exit
goto home
:tsxd
call:exec ts %id% %savepath%
goto gohome
:rsxd
set /P restorepath=Please, enter path to restore^>
call:exec rs %id% %restorepath%
goto gohome
:dirxd
call:exec dir %id%
goto gohome
:dirde
call:exec dir %id%
goto gohome
:gohome
pause
goto home
:error
echo.
echo WMAppManifest not found.
echo Please, check that you entered the correct name for your project
echo.
pause
goto start
:enumerate
if "%programfiles(x86)%XXX"=="XXX" (
"C:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool\ISETool.exe" EnumerateDevices
) else (
"C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool\ISETool.exe" EnumerateDevices
)
goto:eof
:exec
if "%programfiles(x86)%XXX"=="XXX" (
"C:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool\ISETool.exe" %~1 %device% %~2 %~3
) else (
"C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool\ISETool.exe" %~1 %device% %~2 %~3
)
goto:eof