- May
- 13,402
- 190
Maybe I have missed the boat and there is an elegant way to do this.
I have a list of (17, so far) Windows 10 services that to like to stop. I have done this in a BTM.
I can think of several variations on this including a very long "DO /L" command and putting the data into an alternate NTFS stream attached to the BTM but none seem particularly attractive. The method above is kind of minimalist but it causes the BTM to be read many times. How about a mechanism for including data sets in a BTM? Without having given it much thought, perhaps ...
Data segments could be at the end of a BTM, read only once, and (maybe) put into temporary arrays, or temporary environment variables.
I have a list of (17, so far) Windows 10 services that to like to stop. I have done this in a BTM.
Code:
do i=5 to %@lines[%0]
sc stop %@line[%0,%i]
enddo
quit
service1
service2
...
service17
I can think of several variations on this including a very long "DO /L" command and putting the data into an alternate NTFS stream attached to the BTM but none seem particularly attractive. The method above is kind of minimalist but it causes the BTM to be read many times. How about a mechanism for including data sets in a BTM? Without having given it much thought, perhaps ...
Code:
do i=0 to 16
sc stop services[%i]
enddo
quit
_DATASEG services
service1
service2
...
service17
_ENDDATASEG services
Data segments could be at the end of a BTM, read only once, and (maybe) put into temporary arrays, or temporary environment variables.
Last edited: