Page 2 of 2 <12
Topic Options
#161705 - 2006-05-08 07:13 PM Re: Running in VMWare ...
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Woops - change of plans - we going to use Allens WMI script now. The comments from the head-honcho are as follows:

Quote:


WMI is a pig to work with but she has already done one before. If she runs into problem she will fall back to (ntdocs) option.





-Shawn

Top
#161706 - 2006-05-09 12:20 AM Re: Running in VMWare ...
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4563
Loc: USA
Well to completely beat a dead horse, heres a golfed version based on the discussion from Specific WMI Targets

Code:
function IsVMWare()
$IsVMWare=iif(instr(GetObject("winmgmts:\\.\root\cimv2").ExecQuery("Select * from Win32_ComputerSystem").item("Win32_Computersystem='@wksta'").Manufacturer,"VMWARE"),1,0)
Endfunction


Top
#161707 - 2006-05-09 12:33 AM Re: Running in VMWare ...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Then let me beat it some more.

Another Moderator posted non compliant NoMacroInStrings code again.

And not sure, did he say this was LOGON code? If not then remote code for both of us is not complete.

Top
#161708 - 2006-05-09 12:41 AM Re: Running in VMWare ...
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Allen and I will start complying when the "NoAnythingInAnything" setoption comes out.
Top
#161709 - 2006-05-09 12:43 AM Re: Running in VMWare ...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
ROFL - Okay, well then how about at least trimming down the LONG LINE a bit, even on 1280x1024 I have to scroll the code.
Top
#161710 - 2006-05-09 12:46 AM Re: Running in VMWare ...
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4563
Loc: USA
Quote:

ROFL - Okay, well then how about at least trimming down the LONG LINE a bit, even on 1280x1024 I have to scroll the code.




Sorry, couldn't resist...I was so proud of my one line of code...

Top
#161711 - 2006-05-09 12:47 AM Re: Running in VMWare ...
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I have this in my login script:

$What = "VarsIn"
$Where = "Strings"

$= SetOption("No$What$Where", "On")

Top
#161712 - 2006-05-09 12:53 AM Re: Running in VMWare ...
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4563
Loc: USA
Code:
function IsVMWare()
$IsVMWare=iif(instr(GetObject("winmgmts:\\.\root\cimv2").ExecQuery("Select Manufacturer from " +
"Win32_ComputerSystem").item("Win32_Computersystem='" + @wksta + "'").Manufacturer,"VMWARE"),1,0)
Endfunction


Top
#161713 - 2006-05-09 01:46 AM Re: Running in VMWare ...
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Ron, you know me well enough to know I'm just yanking your chain. Your absolutely right - us Mods should be setting a good example - we should all be consistent in our coding practices.
Top
Page 2 of 2 <12


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

Who's Online
0 registered and 1527 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.123 seconds in which 0.084 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