rgrant1993 Posted August 26, 2011 Share Posted August 26, 2011 just use this:@echo offColor 0cwmic csproduct get namepause Link to comment Share on other sites More sharing options...
jaclaz Posted August 26, 2011 Share Posted August 26, 2011 just use this:Perfect! Too bad that it will tell you (maybe ) the actual manufacturer name or maybe nothing, definitely won't tell you whether it is portable or not, so you will have (if a value is returned) to use a database of some kind, to see if the particular model returned is a laptop/netbook or a desktop.jaclaz Link to comment Share on other sites More sharing options...
Yzöwl Posted August 26, 2011 Share Posted August 26, 2011 As both jaclaz and CoffeeFiend mentioned earlier, if your systems are Windows Vista or newer then:@(wmic computersystem get pcsystemtype|find "2">nul 2>&1)&&@(call [encryption stuff])Using the other WMI class mentioned by jaclaz and used earlier by gunsmokingman:@ECHO OFFSETLOCAL ENABLEEXTENSIONS(SET _=)FOR /F "DELIMS={}" %%# IN ( '2^>NUL WMIC SystemEnclosure GET ChassisTypes^|FIND "}"') DO ( FOR %%$ IN (8 9 10 11 12 14 18 21) DO IF %%#==%%$ SET "_=T")IF NOT DEFINED _ GOTO :EOFREM [Encryption stuff here]ECHO=This is a line of text only visible to a 'portable' Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now