
Many Windows PC users will never need to know what system environment variables are, as it is a feature more commonly known by advanced users or programmers. However, with users, applications and malware being able to modify system environment variables to adjust your system’s behaviour, it’s best to understand what you can do to make changes.
System environment variables help locate executable files and libraries, set the default behaviour for apps, store system information and more. They are essential for a computer’s operation, so changing them incorrectly can cause problems. Advanced threat actors can also modify values to take control of the system or lead users to malicious files.
It can be tricky to find out how to change system environment variables on Windows, especially if you need help with what to do with them.
This guide will help you find out how to edit system environment variables on Windows and how the best antivirus software can track down any malicious files that modify them.
Changing system environment variables on Windows: Quick guide
While environment variables are a helpful way to change the behaviour of Windows to your liking, an error can ruin your operating system. Make sure you know what changes to make and refer to application information or system values found online.
If a malicious change has been made, it’s best to perform an antivirus scan to identify and remove any virus or malware making changes.
-
Edit in System Properties
To view and edit system environment variables, head to System Properties and open a dialog box for environment variables.
On your PC, right-click the This PC icon on your desktop or File Explorer. Select Properties and click Advanced system settings. In the window that pops up, choose the Advanced tab and click Environment Variables at the bottom.
This will open the environment variables dialog box. This is split into two sections: User variables and System variables. The former lists variables specific to the current user, while the latter lists variables that apply to all PC users.
Depending on what needs to be changed, click on a variable you need to modify and click Edit. In the new window, you can change the variable name and variable value. Changing the value will change how the variable behaves.
Here, you can correct the variable value if it has been changed. Make sure the variable contains the correct value or path. It may not need a value, so if there is one, clear the field.
Once done, select OK in both dialog box windows to save changes. Restart your PC for any changes to take effect, then identify if the changes have been applied.
-
Identify system variables in Command Prompt
Another way to view system variables set to default on your system is by using Windows Command Prompt. This is an excellent way to get a quick view of variables and their functions., and to see if there is anything out of the ordinary.
In the search box on the taskbar, type Command Prompt and click on the app.
In the Command Prompt window, type in set.
You will see a list of your system variables and their values.
-
Use Windows PowerShell
For a more organised way to check system environment variables and their values, you can use the Windows PowerShell app. This is similar to Command Prompt but displayed in a more manageable way.
In the search box on the taskbar, type Windows PowerShell and click on the app.
In the Windows PowerShell window, type in dir env:
You will see a list of your system variables and their values.
-
Change your passwords
If you’ve noticed any strange behaviour on your Windows PC and it may be due to involuntary changes in system environment variables, chances are your PC has been infected with a virus or malware, and your online accounts and devices are at risk of being compromised.
To help mitigate potential malware threats or hackers taking control of your accounts, change your passwords and use a strong password to stop suspicious activity.
Using password managers such as LastPass or 1Password can help manage all your passwords in one place, create a complex, near-unbreakable master password and encrypt your information.
Changing passwords will stop hackers from trying to steal any sensitive information and your online accounts.
-
Use antivirus software to detect and stop malware
The easiest way to stop malware making edits to system environment variables and taking control of your PC is by using one of the best antivirus software like Norton 360 (from $19.99/year). It will keep you safe from any malicious software, like ransomware, adware, spyware, phishing and more.
That’s not all; antivirus software can provide extra features like VPNs, cloud storage, PC boosters and more. Norton 360 has all these features and extra security tools that can backup your data, prevent online identity theft and stop malware.
What’s more, Norton 360 comes with monitoring features to identify all suspicious activity on your device. It will help detect and notify you about any unusual activity, including changes to system environment variables, and stop it using it’s protection tools.
Check out our Norton 360 review and Norton 360 Platinum review to see which antivirus package suits you best.
What are system environment variables?
System environment variables are values that store vital information about an operating system, hardware and software configuration on Windows. Apps, scripts and the OS perform specific tasks using these variables, such as locating executable files and libraries, defining paths to user data and configuration files, setting default behaviour for apps and storing system information.
As previously mentioned, there are two types of variables. This includes:
– User environment variables: These variables are specific to the current user and are stored in the user’s registry profile.
– System environment variables: These variables are global and apply to all computer users. They are stored in the Windows registry.
Below are a few examples of system environment variables:
– PATH: This variable specifies the directories that the operating system should search for executable files.
– USERPROFILE: This variable specifies the directory where the current user’s profile is stored.
– USERNAME: This variable specifies the name of the current user.
– PROCESSOR_ARCHITECTURE: This variable specifies the type of processor that the computer is using.
There are several various variables with different values. The problem is since the average user doesn’t require making any changes to system environment variables, threat actors can make changes to direct users to malicious files and take control of the system. That’s why it’s essential to use a trustworthy antivirus scanner.

Can any antivirus software stop viruses and malware?
The best antivirus software will stop malware in its tracks. Not all antivirus software is equal, as some don’t have high malware detection and protection rates or have accredited lab scores to back them up.
However, many high-standard AV protections offer near-perfect scores when detecting and protecting against malware, meaning even complex malicious software can’t go unnoticed. Even if threat actors gain access to your PC using malware and try to edit system environment variables, the right antivirus will sniff it out and get rid of it.
Services, including Norton 360 (from $19.99/year) and Bitdefender (from $19.99/year), include device monitoring features to help uncover suspicious activity early and offer the tools to fight off cyberattacks. Whether its a phishing attack, ransomware, spyware or infostealer malware, these security products have the tools to protect you.
These services have protection features that block malicious activity on your device, along with extra features like cloud backup and PC boosters. To make sure your device is ready to identify and block malware damaging your system, set yourself up with an antivirus.
Best antivirus to prevent viruses and malware
1. Norton 360 🥇From $19.99/year
Best overall antivirus of 2023

“Norton” and “antivirus” are synonymous these days, as the well-established cybersecurity brand has successfully fought against malware, viruses and nasty software threats since 1990.
Norton 360 offers excellent antivirus protection and extra features that make for a valuable, all-in-one security product. Its Norton 360 Deluxe and Premium package may cost a pretty penny. Still, with security across multiple platforms, a full-blown VPN, Dark Web Monitoring, Parental Controls and more, it will have a household free of cyber threats.
Norton’s certainty of its antivirus software’s capabilities is clearly defined by the brand’s 100% Virus Protection Promise. If a device protected by Norton 360 can’t get rid of a virus, the user receives their money back. It’s a big claim, but unquestionably, no one should expect to get that refund.
If you have the money for it, you can also check out the premium Norton 360 Platinum package for even more online protection, including from identity theft. Without a doubt one of the best antivirus to get.
Read our full Norton 360 review
Special Offer!
2. Bitdefender 🥈 From $19.99/year
Best security features and tools

Bitdefender takes the spot as best antivirus, and for good reason. It’s not enough that it boasts near-perfect lab test scores across the board, as it goes the extra mile by giving users access to a plethora of advanced security features.
Bitdefender goes above and beyond in the features department, all while keeping known malware, ransomware, and viruses at bay. It will defend your device against new attacks, provide security for online transactions, keep you safe with a reliable VPN, and protect your accounts with a password manager.
It’s a no-brainer when it comes to defending your devices against virtually any form of cyberattack, and its top-notch protection extends to its most affordable package, too. Protecting your PC and smartphone, from Windows and macOS to iOS and Android, is becoming even more necessary, and Bitdefender is the tricked-out shield you need.
Read our full Bitdefender review
Special Offer!
3. Malwarebytes 🥉 From $44.99/year
Best antivirus for Windows PC

Hundreds of malware emerge every minute, and it’s Malwarebytes’ mission to detect and conquer them all. Does the antivirus do this successfully? Yes, but there’s wiggle room for improvements.
Malwarebytes’ no-nonsense approach to protecting your devices from the onslaught of malware and viruses is effective for those who need a reliable antivirus that will detect and remove malicious software, especially with its free version. However, while its premium service provides 24/7 real-time detection, conveniently blocks vicious ransomware and shields users from malicious websites, it doesn’t go beyond on the feature front.
That’s no bad thing, as sometimes a user only needs a powerful antivirus to keep them safe from cyber threats. But considering its competitors add a few more security tools, such as data breach monitoring and a firewall, there’s room for improvement.
Read our full Malwarebytes review
Special Offer!
4. Avast One 🙌 From $39.99/year
Best antivirus for beginners + free plan available!

With Avast One, you can protect your device from viruses, malware and ransomware for free. That’s right, and you don’t have to pay a dime for the extra security features the antivirus throws in, including its VPN, firewall and more.
Avast One will safeguard your device from malware, comes with ransomware protection, blocks harmful websites and downloads from the web, scans your emails for malicious attachments, stops hackers from infiltrating your device through Wi-Fi with a firewall – the list goes on. That’s a lot of tools for software that’s free, and the included VPN and the ability to speed up your PC are a welcome bonus.
It’s the ideal antivirus software for home use, as it takes the hassle out of staying wary of cyber threats lurking around, even if you’re not a tech whizz. What’s more, if you are looking for added precautions, its paid Individual and Family packages still boast great value. Hard to go wrong with this best antivirus.
Read our full Avast One review
Special Offer!
5. AVG👍 From 4.99/month
Best antivirus for + free plan available!

You can never go wrong with free antivirus protection, but some deliver even better detection and protection rates, along with extra security features, without costing a dime. This is where AVG antivirus shines.
AVG provides reliable protection and only a small impact on performance for Windows, Mac, iOS and Android. It safeguards your devices against malware, viruses and zero-day exploits, along with blocking malicious links and attachments in emails. Throw in phishing protection when surfing the internet and extra security features such as its SafePrice browser extension and Network Inspector, and you’ve got yourself a do-it-all antivirus.
Sure, you can find all of these perks with Avast, but if you like a slick, darker user interface that’s easy to navigate, then AVG is for you.
Read our full AVG Antivirus review
Special Offer!