You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Name: RecycleDefaultAppPoolimport"@johnlindquist/kit";functionconfigure(){$.shell="powershell.exe";}functionshowNotificationUsingPowershell(message: string){console.log(`Set to ${$.shell}`);constscript=`Add-Type -AssemblyName System.Windows.Forms$notifyIcon = New-Object System.Windows.Forms.NotifyIcon$notifyIcon.Icon = [System.Drawing.SystemIcons]::Information$notifyIcon.BalloonTipIcon = 'Info'$notifyIcon.BalloonTipText = '${message}'$notifyIcon.BalloonTipTitle = 'Notification'$notifyIcon.Visible = $true$notifyIcon.ShowBalloonTip(10000)`;$`${script}`;}configure();console.log("Recycling DefaultAppPool");console.log(`Set to ${$.shell}`);letapplicationPoolToRestartName=awaitarg({placeholder: "Name of the application pool to restart?",initialChoices: ["DefaultAppPool"],});dev();showNotificationUsingPowershell(`Recycling ${applicationPoolToRestartName}...`);
However when I execute it, it tries to use bash, even tho I told it to use powershell and can see in the dev console that $.shell is set to powershell.
What am I doing wrong? 😢
The text was updated successfully, but these errors were encountered:
Try await exec(script, { shell: 'powershell' }) for powershell, and the builtin notify helper for native notifications. It uses https://www.npmjs.com/package/node-notifier under the hood
I have the following simple script
However when I execute it, it tries to use bash, even tho I told it to use powershell and can see in the dev console that $.shell is set to powershell.
What am I doing wrong? 😢
The text was updated successfully, but these errors were encountered: