Discussion:
What replaces win32_process on 64-bit systems?
(too old to reply)
Dennis
2008-06-10 19:43:01 UTC
Permalink
I've been using code like below on 32-bit Windows XP systems:

set svc=GetObject("winmgmts:root\cimv2")
sQuery="select * from win32_process where name='setup.exe'"
set cproc=svc.execquery(sQuery)

What would be the equivalent on XP or Vista 64-bit systems?

Thanks,
Dennis
Jonathan Liu [MSFT]
2008-06-12 22:05:45 UTC
Permalink
This class is available on 64 bit systems. Are you getting an error?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--
Post by Dennis
set svc=GetObject("winmgmts:root\cimv2")
sQuery="select * from win32_process where name='setup.exe'"
set cproc=svc.execquery(sQuery)
What would be the equivalent on XP or Vista 64-bit systems?
Thanks,
Dennis
Dennis
2008-06-13 19:05:00 UTC
Permalink
Thanks for the reply Jonathan.

I'm not getting an error, but I'm writing scripts for other users with
64-bit systems, and don't yet have one myself to test the scripts on.

You wrote that the win32_process class is available on 64-bit systems; but
in my example, win32_process is used as a table or view, not as a class. Is
the win32_process table/view also available on 64-bit systems?

Thanks again.

Dennis
Post by Jonathan Liu [MSFT]
This class is available on 64 bit systems. Are you getting an error?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--
Post by Dennis
set svc=GetObject("winmgmts:root\cimv2")
sQuery="select * from win32_process where name='setup.exe'"
set cproc=svc.execquery(sQuery)
What would be the equivalent on XP or Vista 64-bit systems?
Thanks,
Dennis
Jonathan Liu [MSFT]
2008-06-13 23:26:25 UTC
Permalink
I am not sure exactly what you mean by Table/View. However, I did try the
script on a 64 bit machine and it works.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--
Post by Dennis
Thanks for the reply Jonathan.
I'm not getting an error, but I'm writing scripts for other users with
64-bit systems, and don't yet have one myself to test the scripts on.
You wrote that the win32_process class is available on 64-bit systems; but
in my example, win32_process is used as a table or view, not as a class. Is
the win32_process table/view also available on 64-bit systems?
Thanks again.
Dennis
Post by Jonathan Liu [MSFT]
This class is available on 64 bit systems. Are you getting an error?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--
Post by Dennis
set svc=GetObject("winmgmts:root\cimv2")
sQuery="select * from win32_process where name='setup.exe'"
set cproc=svc.execquery(sQuery)
What would be the equivalent on XP or Vista 64-bit systems?
Thanks,
Dennis
Dennis
2008-06-16 14:52:00 UTC
Permalink
Thanks for testing this Jonathan. That's a big help.

BTW, by table/view, I meant that "select * from win32_process where
name='setup.exe'" is in the form of an SQL statement; and within that syntax.
the "from" clause is normally followed by a database table or view name.

Win32_process may be a pseudo-table of course, but my point was that this
token was not being used as a class (where it would be instantiated as an
object and then associated methods would be invoked).

Thanks again.

Dennis
Post by Jonathan Liu [MSFT]
I am not sure exactly what you mean by Table/View. However, I did try the
script on a 64 bit machine and it works.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--
Post by Dennis
Thanks for the reply Jonathan.
I'm not getting an error, but I'm writing scripts for other users with
64-bit systems, and don't yet have one myself to test the scripts on.
You wrote that the win32_process class is available on 64-bit systems; but
in my example, win32_process is used as a table or view, not as a class. Is
the win32_process table/view also available on 64-bit systems?
Thanks again.
Dennis
Post by Jonathan Liu [MSFT]
This class is available on 64 bit systems. Are you getting an error?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--
Post by Dennis
set svc=GetObject("winmgmts:root\cimv2")
sQuery="select * from win32_process where name='setup.exe'"
set cproc=svc.execquery(sQuery)
What would be the equivalent on XP or Vista 64-bit systems?
Thanks,
Dennis
Loading...