mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-11 18:52:02 +00:00
* sdf * fsda * fuck * fuck2 * toolz * sdaf * sdfa * saf * sdfa * sdfa * sdf * sdfa * temp rename * temp rename * temp rename * sdaf * the pain is immensurable in the land of byond * the curse of rah * safd * sadf * sadf * gf * asf * fssdfa * sfd * sadf * sfda * brah * brah * it's easier for you to fix this * ffs * brah * brah
33 lines
1.2 KiB
PowerShell
33 lines
1.2 KiB
PowerShell
param([string]$name, [string]$icon, [Int32]$port=80)
|
|
|
|
$hkcu = [Microsoft.Win32.RegistryKey]::OpenBaseKey('CurrentUser','default')
|
|
|
|
$amuid_hkey = $hkcu.CreateSubKey('SOFTWARE\Classes\AppUserModelId\Tgstation.Tgstation', $true, [Microsoft.Win32.RegistryOptions]::Volatile)
|
|
|
|
if ($name) { $amuid_hkey.SetValue('DisplayName', $name) }
|
|
if ($icon) { $amuid_hkey.SetValue('IconUri', $icon) }
|
|
|
|
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
|
|
$notifier = [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier('Tgstation.Tgstation')
|
|
|
|
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom, ContentType = WindowsRuntime] > $null
|
|
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
|
|
|
|
$xml.LoadXml(@"
|
|
<toast>
|
|
<visual>
|
|
<binding template="ToastGeneric">
|
|
<text>Initialization Complete</text>
|
|
</binding>
|
|
</visual>
|
|
<actions>
|
|
<action content="Launch Dream Seeker" activationType="protocol" arguments="byond://127.0.0.1:$port"/>
|
|
</actions>
|
|
</toast>
|
|
"@)
|
|
|
|
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
|
|
$toast = New-Object Windows.UI.Notifications.ToastNotification $xml
|
|
|
|
$notifier.Show($toast)
|