Every scripting language which runs on Windows can call multiple methods of bringing up a popup to users. However, only this CMD method seems to do it for all users, and be callable universally:
msg * /time:9999 /v /w Put your message here!
Every scripting language which runs on Windows can call multiple methods of bringing up a popup to users. However, only this CMD method seems to do it for all users, and be callable universally:
msg * /time:9999 /v /w Put your message here!
Here’s a great place to start:
Get-CimInstance -Class Win32_OperatingSystem | ForEach-Object -MemberName Caption
This gets profoundly useful strings like “Microsoft Windows 10 Enterprise”. If you need the numeric version, the best so far has been:
(Get-ItemProperty -Path c:\windows\system32\hal.dll).VersionInfo.FileVersion
which, right now on this machine, gets us “10.0.18362.387 (WinBuild.160101.0800)”. And for the Windows 10 build:
(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ReleaseID -ErrorAction Stop).ReleaseID
which gets “1903”. All of these are fast, do not depend on systeminfo, and appear to be nice and reliable.
First, download the EXE here:
https://get.adobe.com/reader/enterprise/
Then cause it to run thus:
AcroRdrDC1901220036_en_US.exe /sAll /rs /rps
A full list of command-line options can be had with /?
.
This one is from the amazing Rick Boatright. I saw the ancestor of this thirty-plus years ago in Unix System V, had no idea it had gotten so useful in Microsoft-land. The gist of it is:
\\SERVER_NAME\share_name\dir1\dir2
pushd \\SERVER_NAME\share_name\dir1\dir2
This does multiple things:Z:\dir1\dir2
\\SERVER_NAME\share_name
!!!popd
, and Z: goes away and you’re back to the current working directory you had beforehand!Rather good to see:
https://docs.microsoft.com/en-us/powershell/module/smbshare/close-smbopenfile
So we have a terminal server or other multi-user Windows machine, Windows 7/2008R2 or later. We want to pin one or more icons to the taskbar, for all users. We discover that this is not something extremely easy to do :-) We can, at least reasonably easily, set up the same taskbar icon set for all users, thusly:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband]
TaskBarPins.REG
. Put it in a permanent folder outside of user space, e.g. C:\AutoSettings
, it will be imported automatically at every login.SetTaskBarPins.VBS
in C:\AutoSettings
, containing the following text:Option Explicit On Error Resume Next Dim objShell, ProgramFiles, sRegFile Set objShell = CreateObject("WScript.Shell") sRegFile = """C:\AutoSettings\SetTaskBarPins.REG""" objShell.Run "Regedit.exe /s " & sRegFile, 0, True Set objShell = Nothing
C:\AutoSettings\SetTaskBarPins.VBS
in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
.The next time any user logs into this machine, nothing will appear to have been changed. But when they log off and then log on after that, their taskbar will be the same as the one you exported.
Run it like this, from CMD:
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass script.ps1
There is a way:
If all of your settings are correct but you still get the popup saying that macros are disabled, your OTM file — the VBA project file — is corrupt. In the case of Outlook:
C:\Users\[user]AppData\Roaming\Microsoft\Outlook
Seems like certain VBScript references are being ripped off of the Web; thus it was great to see this: