Logonserver Adding ...
 
Notifications
Clear all

We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!

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
305 Views
(@slipperypete)
Active Member Registered
Joined: 4 months 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: 7 years ago
Posts: 1546
 

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: 4 months 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 4 months ago 3 times by SlipperyPete

   
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1546
 

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: 7 years ago
Posts: 1546
 

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: 4 months ago
Posts: 6
Topic starter  

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


   
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1546
 

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