How to pull numbers from a string and replace the target with those numbers?
I am fairly new to scripting so this might be easy for most but I am trying to pull the first two numbers from the computer name and replace the XX in this file address with them. The sytems the script I am writing to be deployed to will have different file shares holding the software.
computer name will look like this ow44p44pos
COPY \\srvXX\dsXX\pos\pinpad\usb_installvfi_3_1.msi c:\pcms\install TIMEOUT 5
the end result should be the 44 from the computer name replacing the XX in \\srvXX\dsXX\pos\pinpad\usb_installvfi_3_1.msi