I'm new here, so sorry for my english and mistakes in post.
I need help to set variable in batch file -> not so easy as you think. ..example from my batch file:
rem set shortcut for long pc name
set pc1=LongNameOfMyPcNo.1
set pc2=LongNameOfMyPcNo.2
set pc3=LongNameOfMyPcNo.3
rem now, user can type "pc1" and in compmgmt line he get long name
set /p pc=type shortcut name
rem in next line i want get compmgmt.msc /computer:\\LongNameOfMyPcNo.1
compmgmt.msc /computer:\\%pc%
But only what i get is compmgmt.msc /computer:\pc1
So, my problem is that set not working (or i using it bad), doskey, setlocal.. also not working.
I don't want use choice and errorlevel cause i'm talking about 600 computers. So i need to create a "small" database, but i want to do it in txt (.bat)