Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

Determining Desktop or Laptop Imaging - 7.1

Created: 07 Apr 2014 | 7 comments

Just wondering if anyone had a way during imaging for a task to determine if it's a desktop or laptop and if it's a laptop, install VPN.  Possibly create a token, run a script?

Any ideas?

Thanks

Richard Ray

Operating Systems:

Comments 7 CommentsJump to latest comment

andykn101's picture

You could write a script with different exit codes and use conditions in the task sequence.

Look either for the registry key that denotes if Dynamic disks are allowed or not, they're not allowed on laptops (I'm afraid I can't remember what it is) or do a WMI query using wmic.exe to see if a battery is fitted.
 

Authorised Symantec Consultant (ASC) with Endpoint Management Limited, an Authorised Symantec Delivery Provider based in the UK.

Connect Etiquette: Please "Mark as Solution" posts that fix your problem.

Thomas Baird's picture

I'd use a policy for this.  Build a collection with filter and apply the VPN software to it.  This makes sure it's applied and makes it a bit easier to track.

Thomas Baird
Enthusiast for making things better!

WDRAIN1's picture

@ECHO OFF
REM do a wmi query to get the info we want and put it in a variable
FOR /F "tokens=2 delims==" %%A IN ('WMIC csproduct GET Name /VALUE ^| FIND /I "Name="') DO SET machine=%%A
ECHO Computer model: "%machine%"

REM Now we have the model in a variable we can do some logic and run commands, for example...
REM Watch for stray spaces at the end, take out all spaces with: SET machine=%machine: =%
IF /I "%machine%" == "Latitude E6410" (
REM do something specific for an E6410
) ELSE (
REM do something for other types
)

JannasTo's picture

I have exact same job for deploying some software to laptops - I use chassis type.

Command Script task

@echo off
for /f "delims={}" %%i in ('"wmic systemenclosure get chassistypes | find "{""') do set chassisType=%%i
EXIT %chassisType%

The client job. If chassis type = 8,9 or 10 the install the software.

Capture_21.PNG:

rickray76's picture

JannasTo,

That looks like the winner!! Thanks everyone for your assistance!!

Rick

Thomas Baird's picture

very nice!  Well done.

Thomas Baird
Enthusiast for making things better!

sfaucher's picture

Be careful and test this with your hardware. This is completely manufacturer dependent and they don't always pick the most logical option. For instance a microsoft surface tablet comes back as 17, "main system chassis" instead of any number of more suitable types like "portable" or "handheld".

Shawn Faucher | Senior Technology Analyst

Armstrong Teasdale LLP