Archive for Tools

Preview PowerShell Scripts in File Explorer

The ability to preview PowerShell (.ps1) scripts from Window’s File Explorer is not enabled by default, or so it seems. A quick one line PowerShell command fixes that in a jiffy!

  • Right click on PowerShell and select to “run as administrator”
  • Then copy and paste the following:
    Set-ItemProperty Registry::HKEY_CLASSES_ROOT\.ps1 -Name PerceivedType -Value text

image

That’s it! Open up File Explorer and you’ll now be able to preview PowerShell scripts!

P.S. This was tested on Windows 10

How to Fix Windows 7 Update

Lots of complaints about Windows 7 Update being broken or not working right. What happens is that when you select to run Windows update, it will just sit their spinning for hours on end. Some people have left it running for 24 hours.

So frustrating. I know. BTDT.

So, here are the steps that I follow to fix the Windows 7 Update issue:

  1. Set Windows Update to not update
    Open up Windows Update, click on Change Settings, then click to NOT update
  2. Stop the Windows Update service
    You can do this by running services.msc
    Then locate and right click on the Windows Update service, then click to STOP  the service.
  3. Delete certain files from the Software Distribution folder
    Open up File Explorer and drill down C:/Windows/SoftwareDistribution
    Open up the Download subfolder and delete all files within the folder
    Go back a level, open up the DataStore folder and delete all the files within the folder
  4. Download the July 2016 Windows 7 Update Rollup (KB 3172605)
    Open Internet Explorer and go to https://support.microsoft.com/en-us/kb/3172605 
    Scroll down to Method 3 (Microsoft Update Catalog)
    Click on the link and install the Microsoft Update Catalog utility
    Click to select the appropriate download for Windows 7
    Click to View Basket in the top right
    Verify the selected file then click Download
    Select the location to download the file
  5. Install the July 2016 Windows 7 Update Rollup, then Reboot
    Use File Explorer, locate the download file, then double click to run/install it
    Follow the prompts to install it
  6. Reboot your computer
    Rebooting your computer will make sure that the Windows Service is restarted properly
  7. Rerun Windows Update
    Hopefully it will now work for you

Shrink ShareWebDB Log File on SBS 2008

There’s a well known issue on SBS 2008 servers where the SharePoint Config Log file continues to expand. This SQL log file can rapidly grow in size, eating up valuable disk space on your system C: drive.

I first blogged about this back in December 2008 (view blog).

I posted a second blog post 4 years late in December 2012 (view blog) which provided the recommended Microsoft fix (KB 2000544) to truncate the log file, creating a batch command file and an associated SQL command file to truncate this log file.

I only have a few SBS 2008 servers still installed out in the field. But recently I discovered that there is another similar SQL log file that can grow in size: ShareWebDB_log.ldf file.

On this particular server, the ShareWebDB log file had grown to over 200GB in size. Ouch! Ouch! Ouch!

image

The solution is to mimic the two files created for the SharePoint log file solution, but have it truncate the ShareWebDB log file instead.

STEP 1: Create the SQL command file

Download the SQL file from my web site (logshrink2.sql.txt), save it to the root of your C: drive, and then rename it to logshrink2.sql

declare @ConfigDB varchar(255);
declare @ConfigDBLog varchar(255);
declare @ConfigDBCmd varchar(255);
select @ConfigDB =  name from sys.databases where name like ‘ShareWebDb%’;
set @ConfigDBCmd = ‘BACKUP database [‘ + RTRIM(@ConfigDB) + ‘] to disk=”C:\windows\temp\before2.bkf”’;
execute(@ConfigDBCmd);
set @ConfigDBCmd = ‘use [‘ + RTRIM(@COnfigDB) + ‘]’;
execute(@ConfigDBCmd);
set @ConfigDBCmd = ‘BACKUP LOG [‘ + RTRIM(@ConfigDB) + ‘] WITH TRUNCATE_ONLY’;
execute(@ConfigDBCmd);
set @ConfigDBCmd = ‘use [‘ + RTRIM(@COnfigDB) + ‘]’;
execute(@ConfigDBCmd);
select @ConfigDBLog =  name from sys.database_files where name like ‘ShareWebDb_log’;
set @ConfigDBCmd = ‘use [‘ +  RTRIM(@ConfigDB) + ‘] DBCC SHRINKFILE([‘ + RTRIM(@ConfigDB) + ‘_log],1)’;
execute(@ConfigDBCmd);
set @ConfigDBCmd = ‘BACKUP database [‘ + RTRIM(@ConfigDB) + ‘] to disk=”C:\windows\temp\after2.bkf”’;
execute(@ConfigDBCmd);
go

STEP 2: Create the DOS batch command file

Next, download the DOS batch command file from my web site (logshrink2.cmd.txt), save it to the root of your C: drive, and then rename it to logshrink2.cmd

dir c:\windows\sysmsi\ssee\mssql.2005\mssql\ShareWebDb* /s
pause
sqlcmd -S \\.\pipe\mssql$microsoft##ssee\sql\query -E -i c:\logshrink2.sql
pause
dir c:\windows\sysmsi\ssee\mssql.2005\mssql\ShareWebDb* /s
pause

STEP 3: Run the command file with administrator rights

Finally, open up File Explorer, right click on the logshrink2.cmd file, and click to “Run as administrator”

RESULT: Here is a screen shot of running this on the server with a 200GB log file:

image

How to Stop Windows 10 from Installing an Update

Have you encountered a situation where Windows 10 will try to install an update that you don’t want installed? Perhaps for a non-existent printer? Or an update that you just aren’t ready to test, like a new video driver?

Windows 10 seems to love doing things automatically, without any real control over what it does. Fellow MVP’er, Susan Bradley, pointed me to a Microsoft driver tool that will allow you to resume control of some of these updates and troubleshoot such situations.

Check out Microsoft KB 3073930 titled: How to temporarily prevent Windows or driver update from reinstalling in Windows 10

  1. When you click on the link, you will be prompted to run or save “wushowhide.diagcab”. Go ahead and select run.
    image
  2. Click Next to proceed:
    image
  3. Now you can select to hide updates, or to show hidden updates:
    image

QuickBooks Pro 2016 Fails to Open Company File in Multi User Mode

One of my customers has been running QuickBooks Pro 2016 with no issue in multi user mode since we upgraded to it in January. Server is SBS 2011 (Windows 2008 R2).

Yesterday we were putting in a new router and VOIP phone system. We had an issue with Exchange receiving email after the new router was in place. I ran the “Fix My Network” and then rebooted the server. Meanwhile the tech working on the phones found where he had to make a change to the firewall to open port 25.

Long story short, we did some minor things to the server. But an hour later the customer could not open QuickBooks in multi-user mode, although it did work in single user mode.

That pointed to an issue with the Database Manager Service for 2016 (QuickBooksDB26). Sure enough, the service was not running.

image

And when I attempted to restart it manually, it displayed the “started and then stopped” error message:

image

I checked to make sure that firewall rules on the server were correct. I even attempted to re-scan using the the QuickBooks Database Server Manager, but it also just told me that the service was not running.

image

Most solutions to fix this problem centered around uninstalling and reinstalling the QuickBooks Manager service, which I was not keen on doing.

I kept searching, and then found this solution in the Intuit forum that fixed the issue for my customer:

image

Hope this helps you!

Print Conductor for Bulk Printing of Files

It was in 1978 that F. W. Lancaster addressed the concept of a paperless society. And yet here we are nearly 40 years later and printing is still a big business.

And the forecast does not seem to indicate a downward turn.

image

OK, so enough of the bad news. The fact is that we still need to print a lot of things – reports, presentations, graphs, spreadsheets, emails, etc. And perhaps like me, there are times where you need to print multiple files immediately.

I just came across a nice little Windows utility called Print Conductor that will do just that.

image

Imagine you have been working on a series of files for a customer – including some Word documents, Excel spreadsheets, a PowerPoint presentation, several logo images, and an Autocad drawing. And now you need to print out all these different files.

Ugh. You’re looking at a time consuming process of opening each document, starting up the associated program, click to Print, and then click to select Printer.

With Print Conductor, you can highlight (select) all the files that need to be printed, and with once click you can have all your various documents printed immediately!

Here’s a screen shot of the main interface of Print Conductor, where I selected 12 PDF documents that I needed to print. As you can see, it was as easy as 1-2-3:

  1. Select documents to be printed
  2. Select the printer to be used
  3. Start printing

image

Best part of this, besides how easy it is to use this utility, is that this is free for non-commercial use, and $49 per computer for commercial use. Give it a try!

Disable Chrome Browser XP/Vista Warning Banner

Google has announced that their Chrome browser will not be receiving updates in the future if you are running Chrome on Windows XP or Windows Vista. Read Chrome Ends Support for Windows XP and Vista.

Consider this as just one more way to encourage you to move off outdated and unsupported platforms.

But don’t think that Google is picking on Windows. At the same time, they also announced that Chrome will no longer be updated on Mac OS X 10.6, 10.7 and 10.8 platforms.

In all cases, Chrome will continue to work as a browser. It’;s just that it will no longer receive new features, and more importantly, will not receive new security updates.

But … if you are not quite ready to retire your XP or Vista computer, there’s a simple way to disable the annoying banner that displays every time you start Chrome:

image

To disable the banner from displaying:

  • Right click on the Google icon on your desktop or taskbar
  • Click on Properties
  • Click inside the Target: box
  • Position the cursor to the very end, immediately after the final double quote mark
  • Press the spacebar one time
  • Then type:   –disable-infobars 
  • Then click Apply and OK

image

And, if you prefer a video of these steps, I found this one on YouTube — kudo’s to DiegoG!

Two Real Time Savers with Outlook 2016

I’ve been using Office 2016 now for quite awhile, and nearly every day I find myself nodding my head in agreement with two new features in Outlook 2016 that are real time savers for me:

  • Outlook automatically detects if I was supposed to attach a file to the email, but clicked Send without doing so. It then prompts me with a nice reminder. That has saved me multiple times from sending an email without the attachment!
  • Then, when I go to attach a file, Outlook now presents me with a list of recent files that I have accessed or created. No more drilling down through directories for the PDF file I just created and wish to attach. This is a huge time saver for me.

Here are screen shots of these features in action:

Step 1: Create an email and make a reference to an attachment, like this:

image

Step 2: Click Send without attaching a file, and you’ll get the following notification window:

image

Step 3: Click on Insert –> Attach File and Outlook will display a list of recent files:

image

image

Windows Live Mail Leaves Empty Temp Folders Behind

Are you using Windows Live Mail?

If so, you may have discovered lots of strange subfolders within your user’s Temp folder on your computer, with a name format like this {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx} :

image

The clue is that all these folders are empty, and there is one for every day that you use Windows Mail. Apparently, the Windows Mail app does not properly clean up after itself.

As these folders all are empty (zero) in size, they really are not taking up disk space.

But, if you’re like me, I just don’t like seeing junk files hanging around. It’s perfectly fine to delete those empty folders:

  • Drill down to C: –> Users –> your username –> AppData –> Local
  • Highlight all those folders and click Delete.

If you got time on your hands, I’m sure there’s a powerscript or batch file somewhere on the Internet that you could use to do the same thing, and schedule it to run once a week. If you find one that works, please let me know!

This computer will soon stop receiving Google Chrome updates

If you are using Windows XP or Windows Vista or Windows 2003 Server, and using the Google Chrome browser, you may have noticed a new warning (nag) message displaying every time you start up Chrome:

The computer will soon stop receiving Google Chrome updates because Windows XP and windows Vista will no longer be supported.

image

There is a simple way to disable this warning message, by adding: –disable-infobars” option to your Google Chrome shortcut icon.

Here are the steps to do this:

  • Right click on your Google Chrome shortcut icon (either on your desktop or the desktop’s taskbar) and then click Properties
    image
  • In the Target box, go to the end of the line, press the spacebar once and then type:  –disable-infobars
  • To be very clear, what you will type is:
    spacebar dash dash, the word disable, another dash, then the word infobars
  • Click Apply, then OK
    image
  • Restart Google Chrome