tag:help.appveyor.com,2012-11-13:/discussions/questions/48797-in-windows-cmdAppVeyor: Discussion 2020-06-23T07:38:35Ztag:help.appveyor.com,2012-11-13:Comment/484095242020-06-17T13:00:09Z2020-06-17T13:00:09Z% in windows cmd<div><p>AppVeyor seems to remove <code>%</code> in windows cmd variables?<br>
This:<br></p>
<pre>
<code>set mv=percent:%
echo %mv%</code>
</pre>
<p>will echo <code>percent:%</code> on windows. However, in AppVeyor it will echo <code>percent:</code> (see <a href="https://ci.appveyor.com/project/diemmarkus/cpp-ci">minimal sample</a>).<br>
Is there a simple solution to this?</p></div>Markus Diemtag:help.appveyor.com,2012-11-13:Comment/484095242020-06-17T17:32:57Z2020-06-17T17:32:57Z% in windows cmd<div><p>Try putting your command into a separate <code>build.cmd</code> and then call it from yaml:</p>
<pre>
<code>- build.cmd</code>
</pre>
<p>Let me know if that did the trick.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/484095242020-06-18T06:42:11Z2020-06-18T06:42:12Z% in windows cmd<div><p>in the end I want to put it in an encrypted variable:<br></p>
<pre>
<code>environment:
mysecvar:
secure: Rrtj4Qam1DdF6KXiRI7kHw==</code>
</pre>
but the % is removed (and everything after) as soon as the variable is decrypted.</div>Markus Diemtag:help.appveyor.com,2012-11-13:Comment/484095242020-06-19T01:47:02Z2020-06-19T01:47:02Z% in windows cmd<div><p>I'd recommend using PowerShell to work with such variables. This is the example that the variable with percent is perfectly down to worker VM and can be displayed/processed with PS: <a href="https://ci.appveyor.com/project/FeodorFitsner/simple-console/builds/33613189#L3">https://ci.appveyor.com/project/FeodorFitsner/simple-console/builds...</a></p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/484095242020-06-23T07:38:34Z2020-06-23T07:38:35Z% in windows cmd<div><p>thanks. that does the trick!</p></div>Markus Diem