Is anybody else up to sharing their System Tray Icon-compatible one-liner commands?
I’ll start!
powershell.exe -command "$exePath = '\\SOMESERVER\FOLDER\Setup.exe'; $instName = 'LOB Application Name'; Add-Type -AssemblyName PresentationFramework; if (Test-Path -Path $exePath) { $res = ([System.Windows.MessageBox]::Show(('Are you ready to install ' + $instName + '? (Note: It may take a moment for the installer to download and launch.)'),'Automated Installer',1,32)); if ($res -eq 'OK') {Start-Process $exePath} } else { [System.Windows.MessageBox]::Show('PC must be connected to work network to install.','Automated Installer - ERROR',0,16) }"
This command will allow an application to be installed from the Syncro System Tray icon and includes a user confirmation prompt, a test for the file as well as a notice to be patient. It’s easily adapted by changing the two variables at the beginning of the command: exePath and instName. Stick it in the policy’s System Tray as a “Execute a CMD” type and away you go.
Here’s another that clears the Microsoft Teams cache and seems to fix about 90% of calls about Teams acting up. (Or don’t get any more because users can self-medicate.)
Neat! How have you done to add the little icon next to the title? I mean I guess it’s a copy/paste but, is there somewhere we can see all icon available?
Yes, that’s exactly the intention. IME it’s usually Facebook right before in their browser history so I’m guess advertisements that either manage to redirect or they actually clicked on.
The double-quotes are required if you want to use variables within them (ENV in this case) but otherwise yes they could be replaced by singles. Believe me there were a few iterations to get it to work Had to use 8.3 folder name to get avoid the spaces causing an issue also.
It would be really nice to run a script from the library from the tray. Then the script runs would be logged and have access to Syncro Customer and Asset variables.
Some nice scripts in here so far. Please keep them coming.
For sure. I have a little side-project (Shhhhh. don’t tell Syncro!) to load their modules and try to back-fill all of the connection details but so far am blocked by security… (Good thing… I guess.)
These are handy but it would be a LOT better to just be able to present select scripts the user can run.
These scripts are easier to maintain and you have one location for maintaining them rather than having some duplication. The scripts are also more powerful with variables and calls to Syncro functions like logging and alerts…
They can run scripts from the Customer Portal. It’s not as easily accessible as the tray icon but it is an option. The downside is the script ends up being available on every customer portal (unless you restrict them from scripts via permissions.)
We understand that we can have scripts for all portal users, but that’s not feasible when you have many clients that each have scripts that would work great for them, and totally not at all for others.
Essentially, add a new try option for Scripts, Set the option name (same as we do with CMD) then have a dropdown of scripts (as we do on an asset queue), then add the selected script to the asset’s script queue, maybe with an option for a toaster notification after that says “action requested” or whatever.