Logonserver Adding ...
 
Notifications
Clear all

[Solved] Logonserver Adding Backslash

7 Posts
2 Users
1 Reactions
152 Views
(@slipperypete)
Active Member Registered
Joined: 3 weeks ago
Posts: 6
Topic starter  

Howdy.  I'm getting a backslash at the beginning of the logon server.  I don't know why, and need help resolving it.  Here's my command:

ENVVAR=key:logonserver,text:Logon Server,display:%2

The value looks like this: \ServerName.  I've tried to modify the command by adding [sub:1:1], but it didn't help. 

Would really appreciate someone telling me what I'm doing wrong or suggesting an alternative. Thanks!

 


   
Quote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1404
 

Posted by: @slipperypete

Howdy.  I'm getting a backslash at the beginning of the logon server.  I don't know why, and need help resolving it.  Here's my command:

ENVVAR=key:logonserver,text:Logon Server,display:%2

The value looks like this: \ServerName.  I've tried to modify the command by adding [sub:1:1], but it didn't help. 

Would really appreciate someone telling me what I'm doing wrong or suggesting an alternative. Thanks!

 

I notice when i look at the actual environment, it has two initial backslashes but DTI shows just one.

 


   
ReplyQuote
(@slipperypete)
Active Member Registered
Joined: 3 weeks ago
Posts: 6
Topic starter  

Howdy, Glenn!  Thanks for the reply.  I'm wondering if it is possible to set a variable (e.g., %dcservername%) to the value produced by ENVVAR=key:logonserver,text:Logon Server,display:%2, then use TEXT=Logon Server,%dcservername%[sub:1:1], or something like that.  I tried, but my brain couldn't figure it out.

This post was modified 3 weeks ago 3 times by SlipperyPete

   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1404
 

You can use the regex option to eliminate the backslashes.  I'm not the expert but I managed to make the following work:

ENVVAR=key:logonserver, regex:\\+, text:Logon Server, display:%2


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1404
 

Posted by: @slipperypete

Howdy, Glenn!  Thanks for the reply.  I'm wondering if it is possible to set a variable (e.g., %dcservername%) to the value produced by ENVVAR=key:logonserver,text:Logon Server,display:%2, then use TEXT=Logon Server,%dcservername%[sub:1:1], or something like that.  I tried, but my brain couldn't figure it out.

that's an interesting thing. I just learned that Delphi is somehow removing one of the two backslashes as it displays the string, like it's being escaped.  anyway, yes your idea will work as well.

ENVVAR=key:logonserver, text:Logon Server, display:%2[sub:3:100]

this is close to your original solution but not quite there...


   
ReplyQuote
(@slipperypete)
Active Member Registered
Joined: 3 weeks ago
Posts: 6
Topic starter  

Thanks for your replies and this great product!  Both suggestions work great.  Perfect!


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1404
 

The next release will make the second number optional so you can specify starting position through to the end of the text.


   
SlipperyPete reacted
ReplyQuote
Glenn's Page