Remove xbox functions from profile
This commit is contained in:
parent
ad79008bbf
commit
dc3319c32e
1 changed files with 42 additions and 76 deletions
|
|
@ -30,6 +30,12 @@ if ($interactive)
|
||||||
#
|
#
|
||||||
$env:Path = "$env:windir\Microsoft.NET\Framework64;" + $env:Path
|
$env:Path = "$env:windir\Microsoft.NET\Framework64;" + $env:Path
|
||||||
$env:Path = "c:\debuggers;c:\tools\x86;c:\tools\x86\bin;c:\emacs\bin" + $env:Path
|
$env:Path = "c:\debuggers;c:\tools\x86;c:\tools\x86\bin;c:\emacs\bin" + $env:Path
|
||||||
|
|
||||||
|
# Fun times with diffs and the like.
|
||||||
|
#
|
||||||
|
$env:SDPWDIFF = 'odd.exe'
|
||||||
|
$env:SDVDIFF = 'odd.exe -l!'
|
||||||
|
$env:SDVCDIFF = 'odd.exe -ld'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Based on http://winterdom.com/2008/08/mypowershellprompt
|
# Based on http://winterdom.com/2008/08/mypowershellprompt
|
||||||
|
|
@ -215,88 +221,48 @@ function ConvertFrom-Base64UTF8($base64) {
|
||||||
return [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($base64))
|
return [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($base64))
|
||||||
}
|
}
|
||||||
|
|
||||||
# XBOX HELPER FUNCTIONS
|
|
||||||
|
|
||||||
function Get-XboxDeployedPackageInfo()
|
function Save-Change($ChangeNumber, $Description)
|
||||||
{
|
{
|
||||||
xbrun /o reg query '\"HKU\S-1-5-21-2702878673-795188819-444038987-501\Software\Classes\Local Settings\Software\microsoft\windows\currentversion\appmodel\repository\packages"' /s
|
if (!$ChangeNumber) { $ChangeNumber = "default" }
|
||||||
|
if (!$Description) { $Description = "Change-$ChangeNumber" }
|
||||||
|
|
||||||
|
$PackPath = Resolve-Path "~\dpk"
|
||||||
|
if (!(Test-Path $PackPath))
|
||||||
|
{
|
||||||
|
mkdir $PackPath | out-null
|
||||||
}
|
}
|
||||||
|
|
||||||
# function Get-XboxConnectedAddresses()
|
# Get Unique number...
|
||||||
# {
|
$Date = Get-Date
|
||||||
# $addrs = @{}
|
$Prefix = "$($Date.Year).$($Date.Month.ToString('00')).$($Date.Day.ToString('00'))"
|
||||||
|
|
||||||
# $results = xbconnect
|
$Index = "00"
|
||||||
# $reading = $false
|
$items = @(Get-ChildItem $PackPath -Filter "$Prefix*.dpk" | Sort-Object -Property FullName -Descending)
|
||||||
# foreach($line in $results)
|
if ($items.Length -gt 0)
|
||||||
# {
|
|
||||||
# if ($line.IndexOf("XBTP connections") -ge 0)
|
|
||||||
# {
|
|
||||||
# $reading = $true
|
|
||||||
# }
|
|
||||||
# elseif ($reading)
|
|
||||||
# {
|
|
||||||
# $parts = $line.Split(@(' '), 'RemoveEmptyEntries')
|
|
||||||
# $key = $parts[0].Substring(0, $parts[0].Length - 1)
|
|
||||||
# $value = $parts[1]
|
|
||||||
# if ($value -eq 'Unreachable.')
|
|
||||||
# {
|
|
||||||
# continue
|
|
||||||
# }
|
|
||||||
|
|
||||||
# $addrs[$key] = $value
|
|
||||||
# }
|
|
||||||
# }
|
|
||||||
|
|
||||||
# return $addrs
|
|
||||||
# }
|
|
||||||
|
|
||||||
function Connect-XboxHostTelnet()
|
|
||||||
{
|
{
|
||||||
$addr = xbconnect -b
|
$idx = [int]($items[0].FullName.Split('.')[3]) + 1
|
||||||
telnet $addr
|
$Index = $idx.ToString('00')
|
||||||
}
|
}
|
||||||
|
|
||||||
function Invoke-XboxHost($command)
|
$PackFile = "$PackPath\$Prefix.$Index.$Description.dpk"
|
||||||
{
|
Write-Host "Packing change '$ChangeNumber' to '$PackFile'..."
|
||||||
xbrun /x/host /o $command
|
sdp pack $PackFile -c $ChangeNumber
|
||||||
}
|
}
|
||||||
|
|
||||||
function Copy-XboxSystemFile($sourceFile, $targetFile)
|
function Convert-HexNumberToGuid($hn)
|
||||||
{
|
{
|
||||||
Write-Host "Unlinking Host OS and System OS..."
|
$gah = @()
|
||||||
Invoke-XboxHost "xvtool -w 1"
|
while ($hn.Length)
|
||||||
|
{
|
||||||
Write-Host "Shutting down System OS..."
|
$gah += @([Byte]::Parse($hn.Substring(0,2), "HexNumber"))
|
||||||
Invoke-XboxHost "xvtool -s 2"
|
$hn = $hn.Substring(2)
|
||||||
|
}
|
||||||
Write-Host "Mounting System XVD..."
|
return [Guid][byte[]]($gah)
|
||||||
Invoke-XboxHost "xvdutil -m f:\system.xvd"
|
|
||||||
|
|
||||||
Write-Host "Copying file..."
|
|
||||||
xbcp /x/host $sourceFile "Xg:$targetFile"
|
|
||||||
|
|
||||||
Write-Host "Unmounting System XVD..."
|
|
||||||
Invoke-XboxHost "xvdutil -umdn 3"
|
|
||||||
|
|
||||||
Write-Host "Rebooting..."
|
|
||||||
xbreboot /x/host
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Connect-XboxSystemKD()
|
function global:bld { build $args }
|
||||||
{
|
function global:bz { build -PZM $args }
|
||||||
$addr = xbconnect -b
|
function global:bcz { build -cPZM $args }
|
||||||
windbg -k "net:port=50038,target=$addr"
|
|
||||||
}
|
|
||||||
|
|
||||||
function Connect-XboxGameKD()
|
|
||||||
{
|
|
||||||
$addr = xbconnect -b
|
|
||||||
windbg -k "net:port=50039,target=$addr"
|
|
||||||
}
|
|
||||||
|
|
||||||
function Connect-XboxHostKD()
|
|
||||||
{
|
|
||||||
$addr = xbconnect -b
|
|
||||||
windbg -k "net:port=,target=$addr"
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue