Get stuff from the Registry

Get stuff from the Registry

Anonymous
Not applicable
241 Views
3 Replies
Message 1 of 4

Get stuff from the Registry

Anonymous
Not applicable
Hello Everyone,(pre)
(/pre)
Does anybody know how to get the path of the EXE file associated with the .DWG extension from the registry using VBA. I have searched for "from registry" in the user groups but can't find anything.
(pre)
(/pre)
Thanks in advance...(pre)
(/pre)
Roy.
0 Likes
242 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Try again, this time with the correct formatting stuff...

Hello Everyone,


Does anybody know how to get the path of the EXE file associated with the .DWG extension from the registry using VBA. I have searched for "from registry" in the user groups but can't find anything.


Thanks in advance...


Roy.
0 Likes
Message 3 of 4

Anonymous
Not applicable
Roy:

Try this.
The value of "HKEY_CLASSES_ROOT\.dwg" is another class key
"AutoCAD.Drawing.x" where "x" is the version.
The value of "HKEY_CLASSES_ROOT\AutoCAD.Drawing.x" yields several
subkeys, one of which is "protocol\StdFileEditing\server"
The value of the "server" subkey is the full path and executable
designated to handle a file with the extension ".dwg"

In order to access these registry values from VBA you will have to use
Windows system calls. There are many wrappers available.

Hope this helps.

Mike Stokan

>"RoyMeaden" wrote in message
news:f15affb.0@WebX.maYIadrTaRb...
>Does anybody know how to get the path of the EXE file associated with the
.DWG extension from the registry using VBA. I have >searched for "from
registry" in the user groups but can't find anything.


>Thanks in advance...


>Roy.
0 Likes
Message 4 of 4

Anonymous
Not applicable
BTW, if you want to know what reg keys any program is using, try Registry
Monitor (regmon), free from www.sysinternals.com.

--
Ed
--

"Mike Stokan" wrote in message
news:B96D707D43EC234E2F5B5E1D35D72AC9@in.WebX.maYIadrTaRb...
> Roy:
>
> Try this.
> The value of "HKEY_CLASSES_ROOT\.dwg" is another class key
> "AutoCAD.Drawing.x" where "x" is the version.
> The value of "HKEY_CLASSES_ROOT\AutoCAD.Drawing.x" yields several
> subkeys, one of which is "protocol\StdFileEditing\server"
> The value of the "server" subkey is the full path and executable
> designated to handle a file with the extension ".dwg"
>
> In order to access these registry values from VBA you will have to use
> Windows system calls. There are many wrappers available.
>
> Hope this helps.
>
> Mike Stokan
>
> >"RoyMeaden" wrote in message
> news:f15affb.0@WebX.maYIadrTaRb...
> >Does anybody know how to get the path of the EXE file associated with the
> .DWG extension from the registry using VBA. I have >searched for "from
> registry" in the user groups but can't find anything.
>
>
> >Thanks in advance...
>
>
> >Roy.
>
>
0 Likes