Using environment variables is one of the ways that Windows communicates information such as the location of system files and folders -- as set up on your particular computer -- to programs.
I've added some environment variables to /etc/profile and /etc/bashrc, but when I run commands with sudo, they're not there—sudo env does not list them. Is there some other profile I should be editing ...