Thursday, September 3, 2015

windows - Create Percentage Sign Variable to use in Environment Variables

In Windows 10, some environment variables actually use percentage signs to refer to paths. For example, the PSModulePath environment variable looks like this (ignore the additional one I marked out):


enter image description here


and you'll notice that it uses percentage signs to refer to certain directories instead of hard-coded paths. Suppose that I have several environment variables that I want to add, but I would like them to refer to custom directories of my own. For example, if I wanted to add some folder named "Include" located in some custom directory to an environment variable, ideally all I would have to do is add this text to the corresponding environment variable:


%MyCustomDirectoryVariable%\Include

But, of course, there's a problem; I'm not sure if it's even possible to create my own percentage sign variables that can refer to specific directories! Is it possible for me to create my own custom percentage sign variable that the environment variables can properly interpret as a directory? Or if I want to add my own path to an environment variable, must it always be a hard-coded path?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...