Skip to content

Instantly share code, notes, and snippets.

@mscharley
Created December 27, 2014 09:09
Show Gist options
  • Save mscharley/32c387264b5ae24a4522 to your computer and use it in GitHub Desktop.
Save mscharley/32c387264b5ae24a4522 to your computer and use it in GitHub Desktop.
Open multiple Skype instances (Windows/Powershell)
$skypePath = (Get-ItemProperty -Path hkcu:\SOFTWARE\Skype\Phone).SkypePath
if (!(Test-Path $skypePath -pathType leaf)) {
Write-Host "Unable to find Skype for Desktop. Is it installed correctly?"
pause
exit 1
}
$dataPath = "$($env:localappdata)\SkypePortable"
$instanceCount = 2
for ($i = 1; $i -le $instanceCount; $i++) {
$instanceData = "$($dataPath)\Skype.$($i)"
if (!(Test-Path $instanceData -pathType container)) {
Write-Host "Creating: $instanceData"
New-Item $instanceData -force -itemtype directory
}
Write-Host "Running Skype instance $i. Data directory: $instanceData"
& $skypePath /datapath:"$($instanceData)" /removable /secondary
sleep 5
}
$null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment