I'm trying to create a script that will output the last 5 digits of the computer name and set them as the asset tag of the computer, so far i have this
Echo %computername% >> tag.txt // outputs the computer name (SEL-45675) to a text file named tag.txt
biosconfigutility.exe /setconfig:tag.txt // uses the hp utility to load the configuration from the tag.txt file.
My issue is that the tag can't have the first 4 characters, so i need to supress the SEL- part from the tag.txt file
i know that "%Compuername:~0,5%" will make the out be only the first 5 characters which is the opposite of what i'm trying to do.
Echo %computername% >> tag.txt // outputs the computer name (SEL-45675) to a text file named tag.txt
biosconfigutility.exe /setconfig:tag.txt // uses the hp utility to load the configuration from the tag.txt file.
My issue is that the tag can't have the first 4 characters, so i need to supress the SEL- part from the tag.txt file
i know that "%Compuername:~0,5%" will make the out be only the first 5 characters which is the opposite of what i'm trying to do.