General discussion
Thread display: Collapse - |
All Comments
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
Detecting a laptop from a batch file
ipconfig | find "Wireless" > nul
if errorlevel 0 if not errorlevel 1 goto laptop
This method works by looking for WiFi, if your org doesn't have many standalone PCs with WiFi cards. The problem with this is if the laptop's WiFi switch is off or the WiFi interface is disabled from Network Connections, it doesn't show up in ipconfig.
ipconfig /all | find "Dhcp Enabled. . . . . . . . . . . : Yes"
if errorlevel 0 if not errorlevel 1 goto laptop
The above method works well if the only DHCP Windows PCs logging into your domain are laptops. In our case, all desktops have static IPs.