Forum Discussion
- computerNew Contributor
Sorry title is wrong. - "\" from string read from file becomes "\\" in testcomplete.
- tristaanogreEsteemed Contributor
What language are you writing your code in?
The reason I ask is that it's probably an artifact of the language. JavaScript requires that the \ character in a string, in order for it to be properly used, needs to be \\.
It would be helpful, also, if you share your code... asking to help fix your code without actually seeing your code is a bit tricky...- computerNew Contributor
I am using Javascript. here is example code snippet,
var url = "10.10.199.22";
var username = "WIN7-Test01\admin";
var password = "password";Sys.OleObject("WScript.Shell").Run("cmdkey /add:" + url + " /User:" + username + " /pass:" + password );
WIN7-Test01\admin becomes WIN7-Test01admin
WIN7-Test01\\admin becomes WIN7-Test01\\admin
WIN7-Test01\\\admin becomes WIN7-Test01\\admin
Thanks.