Hi all....not sure if this is even in the correct place or not - if not KINDLY guide me in the right direction and I will get it there.
I would like to use WMIC in a batch file or vbscript. I need to be able to enter a computer name or ip address and return the user name. The following works perfectly from a command prompt:
WMIC /NODE: <computername> COMPUTERSYSTEM GET USERNAME
As you can see, that is a lot of typing each time. I have written the following batch file:
@echo off
set /p usrinput = Enter computer name or ip address -^>
WMIC /NODE: %usrinput% COMPUTERSYSTEM GET USERNAME
And it will not work. Does anyone have any ideas??
Thanks in advance for your patience with a newbie..
I would like to use WMIC in a batch file or vbscript. I need to be able to enter a computer name or ip address and return the user name. The following works perfectly from a command prompt:
WMIC /NODE: <computername> COMPUTERSYSTEM GET USERNAME
As you can see, that is a lot of typing each time. I have written the following batch file:
@echo off
set /p usrinput = Enter computer name or ip address -^>
WMIC /NODE: %usrinput% COMPUTERSYSTEM GET USERNAME
And it will not work. Does anyone have any ideas??
Thanks in advance for your patience with a newbie..