• Home
  • Scripts & Tools

PowerShell: Check if Program or Update is Installed and Download with BITS and Install


Scripts & Tools

I recently wrote a PowerShell script for Windows that will check if a program or update is installed and, if not, download it using BITS in low priority, verify the download hash, and then install it and copy the verbose log to a central repository. The example is for the current latest Microsoft Surface Pro 7 firmware, but it can be adapted for just about any installer. 

Read on for the script code...

Continue Reading

Screensaver Operations 2.0 & 1.6.3 Released!


Scripts & Tools

This popular screensaver utility has been updated! Two versions have been released:

1.6.3 (2020-06-15) - The final version that runs natively on older operating systems, requiring either .NET 2 or 3.5.

  • General
    • Huge rewrite of a number of parts of the application to increase stability and remove some rare error messages.
  • Bug/Security Fixes
    • Hid action button if option "CancelOnMouseMove" is enabled.
    • Fixed issue where you can't have both "CancelOnMouseClick" and "CancelOnMouseMove" enabled at the same time.

2.0.3 (2020-06-15) - Includes all the updates from version 1.6.3 and has been converted to run natively on newer operating systems.

Download the latest versions of Screensaver Operations

Continue Reading

File Searcher By Owner 2.0 Released!


Scripts & Tools

After many years, we've released the next version of File Searcher by Owner!

File Searcher by Owner is the number one utility for finding files and folders owned by a particular user or group.

Download File Searcher by Owner 2.0

Much of the code has been rewritten and there are a number of new features in this release:

Version 2.0.2.0 (2020-05-15)

  • General
    • New major version 2.x
    • Upgrade .NET to 4.5.1
  • Bug/Security Fixes
    • None
  • New Features
    • Added filename column to search list view
    • Dropdown at bottom right to convert from bytes to kB (kilobyte), KiB (kibibyte), MB (megabyte), MiB (mebibyte), etc. all the way up to YB (yottabyte) and YiB (Yobibyte)
    • Easily set owner on found files from the search list view
    • Logging - click red (i) button at top-right

Known Issues

  • Minor: Right-click "Send To" options fail to work
  • Minor: Option to convert owner string from SID/SAM to User Principal Name (UPN) is unavailable when run on a Domain Controller or non-domain computer

Upcoming Features

  • Search all files in a directory and see the current owners.
  • Search for multiple owners at the same time.
  • Save log file (for now you need to copy and paste the text to another platform or app)
  • Add path & owner to log of searches
  • Add date created/modified/accessed fields

Continue Reading

Get Windows Drivers Off Your Computer


Scripts & Tools

Did you know that you can, with one easy PowerShell command, extract all 3rd-party Windows drivers from a computer to a folder? It uses the DISM module and is built into newer versions of Windows.

  1. Create a folder location that you want to save the driver files to. In the example we will use C:\Drivers
  2. Open PowerShell elevated (as Admin)
    • Tip 1: Right-click on the Start Menu Button and click "Windows PowerShell (Admin)"
    • Tip 2: Or do it all with your keyboard >> Press Windows Key + X and then press the A key
  3. Type the following command:  Export-WindowsDriver -Online -Destination C:\Drivers | Out-File -FilePath C:\Drivers\Drivers.txt
  4. Wait a minute and now you have a folder of all your current drivers backed up or to use for deployment

All the details and switches for this are available from Microsoft's PowerShell Documentation at https://docs.microsoft.com/en-us/powershell/module/dism/export-windowsdriver

Continue Reading

Screensaver Operations 1.5 Released


Scripts & Tools

Update (2017-06-27): We release a patched version (1.5.4) that implements a couple other minor updates and changes.

We've finally released the next version of Screensaver Operations.

Screensaver Operations is an application for Microsoft Windows systems that allows you to perform configurable actions after a computer has been left idle for a specified amount of time (e.g., log off, shut down, run a process).

Download Screensaver Operations 1.5

There are a lot of new bug fixes and a couple features in the latest release:

  • Bug/Security Fixes
    • Fixed issue where when enabling RunProcessEnabled, the default title and message texts were incorrect.
    • [Window XP & Windows Server 2003 Only] When using the RunProcessEnabled flag, older versions of Windows (XP, 2003) close the process when the screensaver ends. This is due to multiple factors. Windows XP, etc. closes child processes along with the screensaver. It also puts the screensaver in a separate Virtual Desktop and kills all processes in that desktop when the screensaver ends! We have implemented a workaround and running a process in older versions of Windows should work. This issues took many days to fix so we are glad that we got it to work!
    • Changed action button on process run to "Start Now" rather than "Start Process Now" (which was cut off as it only showed "Start Process").
    • Opens "Configure" properly from right-click context menu on SCR file.
    • Fixed some issues with double-quotes in process path or process argument.
    • Fixed issue where sometimes the Keyboard Filter "DisableSpecialKeys" would crash the program when a special key (e.g., the Windows key) was pressed.
  • New Features
    • Added: BackgroundOpacity registry value - Setting allows you to modify background opacity from the default of 75%. Some organizations might want to completely hide content. Note that this setting is not yet available from the Configuration GUI and can only be set via registry and ADMX. (Note: In Windows 8 and newer, Windows always shows an opaque background color as a security feature)
    • Added: A "Snow" Easter Egg. See the README for more information. :-)

Continue Reading

Screensaver Operations News - March 2013


Scripts & Tools

Thanks for the suggestions everyone. What’s in the pipeline? This:

 

 

UPDATE (2013-04-02): 1.4 was completed last week; we just are working getting the proper installer file(s) working. Expect it out this week.

UPDATE (2013-04-05): 1.4 has been released. ADM files are in the works still. Note that following Microsoft's installations standards has forced us to create separate 32-bit and 64-bit MSI installers. Both versions should upgrade the previous 1.3 install without issues (assuming you previously used the MSI to install).

  • Official release of SSO 1.4
    • I’ve been trying to do coding here and there in the little free time I have right now. I am planning on releasing 1.4 sometime this month. Yay!
    • A number of requests have already been implemented in the beta (http://www.grimadmin.com/forum/viewtopic.php?showtopic=43) and the as-of-yet unreleased code has a few more already completed. I have only a couple more things to pop in, including a variable naming conflict that a forum poster found in the beta.
    • Some requests are a little trickier to implement due to staying with the older .NET 2.0 (e.g., capturing mouse clicks outside the program window), but this is worth it IMO to prevent those still running older versions of Windows like XP from having to install.NET framework runtimes.
  • ADMX/ADML files for Group Policy: While I think using registry collections in GPP is simple enough, especially with the registry locations now being the same in version 1.4 for both 32-bit & 64-bit Windows, I am going to create some Group Policy Settings files for SSO due to all the requests. If anyone knows of a better free ADMX editor than the ADMX Migrator tool (http://www.microsoft.com/en-us/download/details.aspx?id=15058) let me know!
  • Some have wondered about adding to the project. If there are any experienced coders out there who would like to work on the code, I’d be happy to work with them (contact me here). I’m also willing to share the source code if someone needs to review it before deploying; you can change anything for use within your organization, but I ask that you not publicly post any source files for the time being. If I ever stop working on the project, I’ll upload the source code under an open & royalty free license.
  • Hate to plug this, but the advertising on this site is minimal and [hopefully] unobtrusive; it honestly doesn’t come close to covering even the hosting costs. I know most admins out there have trained themselves to completely ignore ads, but please take a quick glance over at them once in a while to see if you find them interesting. Please don’t go spam clicking on them though! The SSO page also has a donate button on the bottom of the page if you would like to donate anything.
  • Finally, a reminder that I may not see comments posted to stories or the download pages. Please submit any suggestions, issues, questions, etc. to us using http://www.grimadmin.com/profiles.php?uid=2 to e-mail me or by posting on the forums.

Continue Reading

Screensaver Operations Beta 1.4-b Now Available


Scripts & Tools

Dear admins! I know we've been missing with updates for a while, but we hope to get things rolling again soon! To that end, I wanted to update everyone on the latest beta version of Screensaver Operations. This beta release is primarily marked by the ability to natively run on both 32-bit and 64-bit Windows, as well as some feature requests.

 

Download Screensaver Operations Beta 1.4-b now in our forums!

 

Screensaver Operations is an application for Microsoft Windows systems that allows you to perform configurable actions after a computer has been left idle for a specified amount of time (e.g., log off, shut down).

Continue Reading

Repair Messed Up EXE File Association


Scripts & Tools

Some viruses now are messing with your file associations making it hard to open programs, such as your Web browser so that you can download and install an anti-mailware program, or even open the cleaner application itself. It's usually simple to remove the changes made when in a registry editor, but since Regedit.exe and other editors are executable files, you can't easily open them either!

Below is a registry fix that I have found useful to have on hand to easily reset the .EXE file association back to it's normal state so that you are no longer prevented from running programs.

 

Repair EXE Registration.reg

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Classes\.exe]
[-HKEY_CURRENT_USER\Software\Classes\secfile]
[-HKEY_CLASSES_ROOT\secfile]
[-HKEY_CLASSES_ROOT\.exe\shell\open\command]

[HKEY_CLASSES_ROOT\exefile\shell\open\command]
@="\"%1\" %*"
[HKEY_CLASSES_ROOT\.exe]
@="exefile"
"Content Type"="application/x-msdownload"

 

Importing this registry data file will remove any custom edits that any malware makes to your .EXE file associations in the HKCU area and then sets the file association open command back to normal. From there you should be able to open your malware cleaning tools.

We recommend that you copy the registry data file to a local disk on your computer prior to running due to the fact that newer versions of Windows will often by default not allow you to import a .REG file if you run it from a network share.

Continue Reading