Logonserver Adding ...
 
Notifications
Clear all

We appreciate the contributions many of you have been able to make towards repairing the storm damage and keeping a roof over our heads. With your help we’ve been able to complete much of the critical work. There is still work to be done to secure the house and your continued support will be a huge help.

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

[Solved] Logonserver Adding Backslash

7 Posts
2 Users
1 Reactions
1,758 Views
(@slipperypete)
Active Member Registered
Joined: 1 year 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!

 


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1865
 

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.

 


   
(@slipperypete)
Active Member Registered
Joined: 1 year 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 1 year ago 3 times by SlipperyPete

   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1865
 

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


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1865
 

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...


   
(@slipperypete)
Active Member Registered
Joined: 1 year ago
Posts: 6
Topic starter  

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


   
Glenn
(@glenn)
Member Admin
Joined: 8 years ago
Posts: 1865
 

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


   
SlipperyPete reacted
Glenn's Page