Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,654 of 68,980    |
|    Robert Roland to fizzbintuesday@that-google-mail-dom    |
|    Re: Finding names of services    |
|    21 Oct 20 16:58:02    |
   
   From: fake@ddress.no   
      
   On Tue, 20 Oct 2020 10:13:39 -0400, "Tom Del Rosso"   
    wrote:   
      
   >how can you translate   
   >them into the short names?   
      
   Would a bit of PowerShell be considered cheating?   
      
   PowerShell has a feature where it can take script code directly on the   
   command line, so no external files are needed. Here's an example for   
   your specific problem:   
      
      
   @echo off   
      
   set service=Computer Browser   
      
   for /F "usebackq" %%n in (`powershell -command "Get-Service -Name   
   '%service%'|Format-Table -AutoSize -HideTableHeaders -Property name"`)   
   do set shortname=%%n   
      
   echo The short name is: %shortname%   
   --   
   RoRo   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca