# win\_environment - setting variable to value starting with %

**URL:** <https://forum.ansible.com/t/win-environment-setting-variable-to-value-starting-with/29656>\
**Category:** Ansible Project\
**Created:** [February 12, 2019, 2:32pm UTC](https://forum.ansible.com/t/win-environment-setting-variable-to-value-starting-with/29656 "2019-02-12T14:32:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tuyen\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Post date:** [February 12, 2019, 2:32pm UTC](https://forum.ansible.com/t/win-environment-setting-variable-to-value-starting-with/29656/1 "2019-02-12T14:32:13Z")

</div>

Hi

I am trying to set some environment variables to make the value start with %, and I am getting errors.

For example, if I wanted to set the TEMP environment to c:\temp

and then I want to set the PATH environment variable to %TEMP%

I am getting error “found character that cannot start any token”

I assume this is because % is a special character and cannot be at the beginning of a string. How do I get around this?

Thanks in advance.

Regards,

---

<div class="post-metadata">

**Author:** ![Tuyen\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tuyen\_Nguyen](https://forum.ansible.com/u/Tuyen_Nguyen)\
**Post date:** [February 12, 2019, 9:21pm UTC](https://forum.ansible.com/t/win-environment-setting-variable-to-value-starting-with/29656/2 "2019-02-12T21:21:43Z")

</div>

Actually, I figured this out

Instead of the value being referenced as:

value: %test%  
or  
value: ‘%test%’ which I think did not work as well

I put the value on the next line

value:  
‘%test%’

And this works now as I needed.
