Stop Discord from Automatically Running When Windows Starts

Introduction

I use Discord as part of the weekly YouTube Minecraft stream I participate in, Adults Only Minecraft (which is actually family friendly), run by my friend Marc.

Of late though, Discord has been misbehaving. Even though I have it set not to auto load when Windows launches, it ignores the setting and still runs.

While I like Discord, I only use it once a week or so, and don’t want it running in the background all the time.

In this bonus post, let’s see how to fix this problem.

Check Your Discord Settings

First, let me state that not everyone is experiencing this issue, or needs the solution I’ll outline here. Let’s start with the simple solution first.

Open Discord, then your settings. Scroll down to Windows Settings, as you see below.

The toggle, pointed at by the arrow, indicates whether Discord should launch with Windows. If yours is on, and you don’t want it to auto launch, just click on it to turn it off as seen in this image.

Exit Discord, reboot, and if Discord does NOT launch, you’re done!

In my case however, that did not correct the issue. If that was the case for you too, proceed to the next section.

Disabling Discord Autorun in Windows

In the past, people have written instructions to go into Task Manager, expand into the detailed display, go to the Startup tab, and disable Discord.

Over time though, Discord changed things so their application no longer appears here. To fix, we’ll need to go download another tool called Autoruns.

Go to https://sysinternals.com, this will redirect you to a Microsoft web page (Microsoft bought SysInternals quite a few years back).

Once there, click the Downloads link on the left. SysInternals is a rich suite of tools, and you can certainly download all of them, but the only one you need for this task is Autoruns. Simply scroll down until you see it appear.

Click on the link to take you to the Autoruns info page, the download link is at the very top. Click on it to download the Autoruns.zip file to a folder on your hard drive.

Unzip the contents and it will expand several files. No installation is needed, these will simply run from wherever you put them. If you are on a 64 bit operating system, and pretty much anyone with a modern computer is, the file to double click on is Autoruns64.exe. If you are on an older 32 bit computer, you can run Autoruns.exe.

A little side note, after running the application the listing area uses an incredibly small 4 point font. Easy to fix, in the menu click Options, Font, and pick a bigger font size. For this image I went with a 12 point font.

At the top is a filter box, pointed at by the green arrow in the image below.

Enter the word Discord into it. Autoruns should then filter the list to just the entry for Discord.

Now simply uncheck the box, pointed at by the orange arrow in the image above.

That’s it!

OK, you are done. Close Autoruns, and reboot your computer. When you do, Discord should no longer start up automatically.

Discord Updates

Note, it is always possible after an update from Discord, they will reset this to turn it back on. If you suddenly find Discord starting up again when Windows boots, then just follow the instructions again to disable Discord in the Autoruns app.

It’s also possible at some point in the future Discord may correct this issue. Occasionally, perhaps once a month, check this back on then reboot to see if Discord still launches or not.

Conclusion

Don’t get me wrong, I like Discord a lot, and use it weekly. It’s a great tool for gaming. However, when I’m not playing Minecraft I don’t want it running in the background all the time, taking up resources.

If that’s the case for you then hopefully this post will aid you in correcting the issue.

Cut and Copy Fast and Easy with PopClip for macOS

Introduction

Everyone has little tools they find useful, tools that make using their computers easier. Often they are time savers, even ones that only save a second or two will add up over time.

I thought I’d spend a few posts talking about some of my favorites. In this first post we’ll talk about a tool to make cutting and copying text into the clipboard fast and easy on an Apple Mac – PopClip.

PopClip for macOS

Cut and / or Copy of text is something we all do a thousand times a day. Even though it’s fast action, anything we can do to make it even faster adds up by the end of the day.

On the Apple Mac, I found PopClip to be a fantastic tool. It’s available in Apple’s App store, for the reasonable cost of $12.99.

So how does it work? Well it’s pretty simple. Start by highlighting text, here I’ve opened the basic text editor on my MacBook and highlighted part of a sentence.

When you highlight text, you will see a little toolbar automatically appears or “pops up”, without having to right click or take any other action.

Here PopClip is giving us the option of cutting and copying the text. I also happened to have something in the clipboard, so the option to paste that in also appears.

The magnifying glass will launch our default browser and use your default search engine and do a search on the selected text.

But wait, there’s more!

In addition to the standard cut / copy / paste, PopClip offers a vast array of extensions. In the following screen shot, I’ve added the braces extension.

With the braces extension added, you can now see additional options added to PopClip’s bar. For this shot, instead of clicking copy I’ll be clicking on the Square Brackets button.

This will copy the the text into my clipboard, adding brackets around it. Then when I paste it, the pasted text now is surrounded by brackets as you can see above.

The braces are just one of over a hundred extensions available to you with PopClip.

Conclusion

I realize it may seem simple, but once you try it you will be amazed at how much nicer cut and copy becomes on your Mac. In addition the vast array of extensions will make other operations you frequently do, such as surrounding text with braces, fast.

In the next post we’ll look at a similar tool for Windows, then over the next few posts highlight some other tools I find very useful in my daily life.

Connecting to SSAS from Report Builder Query Designer – A Connection Cannot Be Made

Introduction

Recently I was attempting to create a dataset in the SQL Server Reporting Services Report Portal. I created my data source, then launched Report Builder to create my Dataset.

Report Builder connected to my SQL Server Analysis Services Tabular database OK, the Test Connection button worked, but when I tried to go into the query designer I kept getting the error:

A connection cannot be made. Ensure that the server is running.

I knew my server was running, I could connect to it and run queries from SSMS (SQL Server Management Studio). I found some solutions that suggested I change my SQL Server Browser service to log on using the Local System account. Tried it, didn’t work.

I found another solution recommending I add a firewall rule to allow inbound traffic on port 2383, but no love there either.

The Solution

It turned out it was all related to the way I’d formatted my data source connection string in the SSRS Report Portal. I had entered it as:

Data Source = acdev;initial catalog = WWI-SSAS-Tabular

When I used the Test Connection button in the Report Portal, it worked fine. It even let me connect when I launched Report Builder. But when I tried to launch the query designer in Report Builder, it gave me the aforementioned error:

A connection cannot be made. Ensure that the server is running.

I came upon my solution by launching Report Builder, and telling it I wanted a data source embedded in my report. On my first attempt I simply copied what you saw above from the Report Builder, and was faced with the same crushing disappointing result.

On the second try I used the Report Builder feature to actually build my connection string. Report Builder produced:

Data Source=acdev;Initial Catalog=WWI-SSAS-Tabular

And by golly, it worked! I was able to use the query builder to create a DAX query.

To be sure I was still sane, I went back to the Report Builder and replaced my connection string with the one above. Still in the Report Portal, I added a new Dataset which launched Report Builder.

I picked the Data Source I’d just updated in the Report Portal, and this time I was able to get into query builder, create a new query, and save it back to the server as a dataset.

Conclusion

I can only guess it was the extra spaces around the equal signs that were messing things up. I’d added the spaces thinking it made it a bit more readable. Readable, but as it turns out non-functional.

Some of you maybe going “you big dummy” at this point, and perhaps justifiably. I still think it’s odd though that the test connection buttons in multiple tools all worked, yet the query designer crashed.

Regardless, I’m happy I was finally able to find the solution. I’d spent almost five hours on this, so hopefully this will save you a little time and get you back to creating queries.

What is My COM Port?

Introduction

I’m a ham radio operator, and I recently gave a presentation to my local club on how to program your radio using software. To do this, we need to connect our radios using a USB cable.

Most of the radios use a concept called a VCP or Virtual COM Port. You install the VCP driver, then can connect your USB cable to your computer, plug the other end into the radio, and launch the software.

The software will want to know, what is the COM port number you are using. I have a variety of radios, and it seems each cable wants to use a different COM port, and every so often the cable will wind up using a different COM port than it did last time.

So how do you find out your COM port? Well it’s pretty easy if you know where to look.

Finding Your COM Port

The best place to find this is in the Windows Device Manager. Click on the magnifying glass next to the Start menu icon.

I have my Windows toolbar set to hide the search entry box, but some systems will have a text box right next to the search. Which ever way yours is configured, start to type “device manager” into the search.

You should see a pop up like you do in the image above when it finds the Device Manager application. Just click on it to run it.

Scroll down in Device Manager until you find the entry for “Ports (COM & LPT)“. Click the arrow beside it in order to expand the list, and you should now see the COM port for your cable, in this case COM10.

Note that your cable will need to be plugged in for the entry to appear.

Conclusion

There you go, I told you it was easy, the trick is knowing where to look.

While I did write this with my fellow amateur radio operators in mind, there are all kinds of devices that need to use a COM port to access them from your PC. Using this quick guide you can easily find where to look to get the right COM port number for your situation.

Solving “An error happened while reading data from the provider” When Connecting to SQL Server From Visual Studio 2019

Introduction

Recently I was working on a SQL Server Analysis Services Tabular project in Visual Studio 2019. In attempting to connect to a SQL Server database to import data, I got the following error.

An error happened while reading data from the provider: 'Could not load file or assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)'

Let’s see the steps I went through to get to this point…

Reproducing the Error

Start by opening your SSAS Tabular project in Visual Studio 2019. In the Tabular Model Explorer, right click on Data Sources, then pick New Data Source.

In the Get Data window, pick Database, then “SQL Server database” and click Connect.

In the “SQL Server database” window, enter the name of the server, for example “localhost”. Click OK.

In the credential window, with the default of Windows credential, use Impersonate Account for the Impersonation Mode.

Enter your credentials and click OK.

You get a dialog titled “Unable to connect“.

You get this, despite knowing you’ve entered your credentials correctly. I actually found the solution in a PowerBI issue on Stack Overflow, they were having a similar problem.

The Solution

The solution, as it turned out, worked for both PowerBI and Visual Studio 2019. Simply run Visual Studio 2019 in administrator mode.

In the pic above, I have VS2019 in my toolbar. I right clicked on the icon, then in the menu right clicked on Visual Studio 2019. I then picked the Run as administrator option.

Following the steps in the Reproducing… section above I entered my credentials and clicked OK.

After clicking on OK, instead of the error I got an Encryption Support error, that it was unable to connect using an encrypted connection. I believe that was because, in my case, Visual Studio and SQL Server are both on the same box, in a development VM. As such, I’d not bothered with the overhead of setting up encrypted connection support in SQL Server. In this case I was OK with that so just clicked OK.

Now the Navigator window appeared, and I was able pick a database to import from.

Conclusion

I hope this simple fix works for you. I know I spent forever looking for an answer, and was lucky that trying the same solution that worked for PowerBI, running in admin mode, also worked for Visual Studio 2019.