Page 1 of 1 1
Topic Options
#12172 - 2001-09-07 07:06 PM Determining if a PC is a workstation or a laptop
Anonymous
Unregistered


Does anyone know of a way I could use Kix to determine if a PC is a workstation or a laptop ? I know that there are 101 ways of doing this by doing anything from changing the computer name, to putting a unique registry entry in the laptops, that I could query in my login script. I'm sure lots of people have ran into this problem, where they want to make changes only to the desktops, or laptops only. What I am looking for is a pre-existing key in the registry that would tell me if it's a laptop. I've tried looking to see if there were any PCMCIA specific keys, or battery/APM/ACPI keys that could tell me. What I am trying to avoid is having to track down every laptop and merge a reg key manually to brandish it so it would from then on be distinguishable.

Thanks,
Jon
Jon.Lundfelt@VECO.com

Top
#12173 - 2001-09-08 07:21 AM Re: Determining if a PC is a workstation or a laptop
Ashpoint Offline
Starting to like KiXtart

Registered: 1999-08-27
Posts: 192
Loc: Sydney, NSW, Australia
Hello Jon...

This may not be what you want but I also struggled to find some universal uniqueness to identify the laptop. In the end I reasoned that the user still needs me to get their system onto our network, I decided to put a unique file into the \Windows folder.

I'm putting in a file called _laptop_.txt and then testing for the file within Kix.

The code looks like...

code:

IF EXIST(%windir% + "\_Laptop_.txt") = 1
$Laptop = "1"
ELSE
$Laptop = "0"
ENDIF



Hope this helps. (I would also be interested to hear other better solutions.

Michael

[ 08 September 2001: Message edited by: Ashpoint ]

Top
#12174 - 2001-09-08 07:36 AM Re: Determining if a PC is a workstation or a laptop
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Spark up search and enter PCMCIA. You'll get lots of suggestions.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#12175 - 2001-09-08 11:21 PM Re: Determining if a PC is a workstation or a laptop
Anonymous
Unregistered


Jon,
Strangely enough we have been looking at this just a few days ago.

We have eventually decided to use WINBIOS (an IBM bios display tool)
when you use the /G option it displays the full nine yards of BIOS information, one of the fields (can remember which one - I am at home) is desktop, laptop, notebook etc - this is assuming that the manufacturer took the trouble to set this, but to our surprise - this works with all of our workstations.

However, we already happened to be running winbios on each workstation, so it was no trouble to get this extra piece of info.

FFT
Mark

Top
#12176 - 2001-09-10 09:45 PM Re: Determining if a PC is a workstation or a laptop
Anonymous
Unregistered


Thanks for all of your input. Below is the script I will use.

$PCMICANT = READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Pcmcia","Start")
$PCMCIA9X0 = ExistKey("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\PCMCIA\0000")
$PCMCIA9X1 = ExistKey("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\PCMCIA\0001")

IF @INWIN=1 AND $PCMICANT = 0
GOSUB LAPTOPNT
ENDIF

IF @INWIN=2 AND $PCMCIA9X0 = 0 OR $PCMCIA9X1 = 0
GOSUB LAPTOP9X
ENDIF

:END
EXIT

:LAPTOPNT
?"THIS IS A NT/2000 LAPTOP"
SLEEP (10)
RETURN

:LAPTOP9X
?"THIS IS A 9X LAPTOP"
SLEEP (10)
RETURN

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.1 seconds in which 0.072 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org