Rather good to see:
Close shared files on a Windows file server in Powershell
article #1288, updated 49 days ago
Pin to Taskbar for All Users in Windows
article #1287, updated 52 days ago
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:
- Log into the one machine, and set up the taskbar as you would like it to appear for all.
- Export the following registry key:
to a file named
TaskBarPins.REG. Put it in a permanent folder outside of user space, e.g.
C:\AutoSettings, it will be imported automatically at every login.
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
- Create a shortcut to
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 PowerShell script bypassing execution policy
article #1131, updated 549 days ago
Run it like this, from CMD:
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass script.ps1
AutoHotKey and VBscript self-elevate to administrator
article #1104, updated 626 days ago
There is a way:
Script/Macro capability won't enable in VBA
article #934, updated 1190 days ago
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:
- Export your modules to .BAS files
- Exit Outlook
- Go here in Explorer:
- Delete the OTM file
- Restart Outlook
- Import your exported .BAS files into the new VBA project which it created for you.
Great VBScript reference
article #928, updated 1195 days ago
Seems like certain VBScript references are being ripped off of the Web; thus it was great to see this:
Windows automation / keyboard and mouse macros, in Python
article #823, updated 1470 days ago
Two very interesting and related developments:
article #737, updated 1729 days ago
It’s not very much documented, but if you have a lot of WordPerfect files, try renaming their extensions to .DOC. Word will load them, unless they are very old files from WordPerfect for DOS.
If you have a huge tree of WPD files, use a batch file like this:
For /R "X:\TOP_OF_TREE" %%G in (.) Do ( Pushd %%G Echo now in %%G ren *.wpd *.doc Popd ) Echo "Done!"
An excellent resource on CMD, VBscript, PowerShell, Bash, Oracle, OS X, SQL Server, Access...
article #628, updated 1982 days ago
Detect Computer Group Membership
article #544, updated 2226 days ago
Dim objNetwork Set objNetwork = CreateObject("WScript.Network") Dim objWinntComp Set objWinntComp = GetObject("WinNT://" & objNetwork.UserDomain & "/" & objNetwork.ComputerName & ",computer") MsgBox "WinNT://" & objNetwork.UserDomain & "/" & objNetwork.ComputerName & ",computer" Dim strGroupToCheck strGroupToCheck = "GROUP_TO_DETECT" If IsMemberOfGroup(objNetwork.UserDomain, objWinntComp, strGroupToCheck) = True Then MsgBox "You are a member of " & strGroupToCheck ElseIf IsMemberOfGroup(objNetwork.UserDomain, objWinntComp, strGroupToCheck) = False Then MsgBox "You are NOT a member of " & strGroupToCheck WScript.Quit ElseIf IsMemberOfGroup(objNetwork.UserDomain, objWinntComp, strGroupToCheck) = "Error" Then MsgBox "There was no group found called " & strGroupToCheck WScript.Quit End If Function IsMemberOfGroup(strUserDomain, objComp, strGroup) 'the user is a member of a specified group IsMemberOfGroup = False Dim objGroup On Error Resume Next Set objGroup = GetObject("WinNT://" & strUserDomain & "/" & strGroup & ",group") If Err.Number Then IsMemberOfGroup = "Error" Else IsMemberOfGroup = objGroup.IsMember(objComp.ADsPath & "$") End If End Function