Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Can I use the uuid with new-object -comobject

Reply
 
Old 05-01-2007   #1 (permalink)
DouglasWoods


 
 

Can I use the uuid with new-object -comobject

I would like to access a com object but I only have the uuid. Can this be done?
--
Douglas Woods

My System SpecsSystem Spec
Old 05-01-2007   #2 (permalink)
/\/\o\/\/ [MVP]


 
 

RE: Can I use the uuid with new-object -comobject

Not sure if you can, but you can find the ProgID from the GUID first like
this :

PoSH> function get-ProgID ($guid) {(gp
"registry::\HKEY_CLASSES_ROOT\CLSID\{$GUID}\ProgID").'(default)'}

PoSH> get-ProgID 13709620-C279-11CE-A49E-444553540000
Shell.Application.1

PoSH> New-Object -ComObject (get-ProgID 13709620-C279-11CE-A49E-444553540000)

Application Parent
----------- ------
System.__ComObject
System.__ComObject

h.t.h.

Greetings /\/\o\/\/
http://thePowerShellGuy.com


"DouglasWoods" wrote:

> I would like to access a com object but I only have the uuid. Can this be done?
> --
> Douglas Woods

My System SpecsSystem Spec
Old 05-01-2007   #3 (permalink)
Maximilian Hänel


 
 

Re: Can I use the uuid with new-object -comobject

Hi //o//,

> Not sure if you can, but you can find the ProgID from the GUID first like
> this :


[...]

Or like this:

$type= [Type]::GetTypeFromCLSID('13709620-C279-11CE-A49E-444553540000')
$obj = [Activator]::CreateInstance($type)

hth

Max
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Service Pack 2 Vista64 H/P The string universal unique identifier (UUID) is invalid Windows Updates
RE: CLID, SID, GUID or UUID? Vista account administration
new-object -comobject "CAPICOM.Signed" failing on Win2k3? PowerShell
New-Object -ComObject x -Strict - A very good idea PowerShell
Adding canonical aliases for Compare-Object, Measure-Object, New-Object PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46