Re: enumerating control pannel items from 32 bit executable on XP 64 bit and Vista 64 bit

Discussion in 'Windows 64bit' started by Homer J. Simpson, Jan 18, 2009.

  1. I'm not sure how realiable that would be, or if it would miss any item, but
    couldn't you simply obtain a listing of all *.cpl files under
    %windir%\system32 and %windir%\syswow64?

    If you need user-friendly names to display to a user, you can probably use
    the .cpl's FileVersionInfo structure like you can for any EXE/DLL.
     
    Homer J. Simpson, Jan 18, 2009
    #1
    1. Advertising

  2. Homer J. Simpson

    Carlos Guest

    Re: enumerating control pannel items from 32 bit executable on XP

    Homer,
    32 bit processes, when doing a simple "dir *.cpl" on \system32 are fooled by
    the OS and redirected to \syswow64.
    The workaround I mention in my post allows skipping that restriction.
    For example, my main shell for exploring is ZtreeWin.
    It is a 32-bit app, it cannot launch 64-bit apps, but it can access both sys
    folders thanks to that workaround.
    :)
    Carlos

    "Homer J. Simpson" wrote:

    > I'm not sure how realiable that would be, or if it would miss any item, but
    > couldn't you simply obtain a listing of all *.cpl files under
    > %windir%\system32 and %windir%\syswow64?
    >
    > If you need user-friendly names to display to a user, you can probably use
    > the .cpl's FileVersionInfo structure like you can for any EXE/DLL.
    >
    >
    >
     
    Carlos, Jan 18, 2009
    #2
    1. Advertising

  3. Re: enumerating control pannel items from 32 bit executable on XP

    You're correct, Carlos. A 32-bit process will not see the "real" system32
    folder, but will see the SysWOW64 folder as if it were system32.

    --
    Charlie.
    http://msmvps.com/blogs/xperts64
    http://mvp.support.microsoft.com/profile/charlie.russel

    "Carlos" <> wrote in message
    news:...
    > Homer,
    > 32 bit processes, when doing a simple "dir *.cpl" on \system32 are fooled
    > by
    > the OS and redirected to \syswow64.
    > The workaround I mention in my post allows skipping that restriction.
    > For example, my main shell for exploring is ZtreeWin.
    > It is a 32-bit app, it cannot launch 64-bit apps, but it can access both
    > sys
    > folders thanks to that workaround.
    > :)
    > Carlos
    >
    > "Homer J. Simpson" wrote:
    >
    >> I'm not sure how realiable that would be, or if it would miss any item,
    >> but
    >> couldn't you simply obtain a listing of all *.cpl files under
    >> %windir%\system32 and %windir%\syswow64?
    >>
    >> If you need user-friendly names to display to a user, you can probably
    >> use
    >> the .cpl's FileVersionInfo structure like you can for any EXE/DLL.
    >>
    >>
    >>
     
    Charlie Russel - MVP, Jan 18, 2009
    #3
  4. Re: enumerating control pannel items from 32 bit executable on XP

    > Homer,
    > 32 bit processes, when doing a simple "dir *.cpl" on \system32 are fooled
    > by
    > the OS and redirected to \syswow64.
    > The workaround I mention in my post allows skipping that restriction.
    > For example, my main shell for exploring is ZtreeWin.
    > It is a 32-bit app, it cannot launch 64-bit apps, but it can access both
    > sys
    > folders thanks to that workaround.
    > :)
    > Carlos


    Dang. You're absolutely right. I was just looking at the content of the
    two folders I mentioned, but--obviously--I'm doing this via Explorer, which
    is 64-bit. "Duh" on me.

    But...using Wow64DisableWow64FsRedirection() *in conjunction* with
    enumerating all *.cpl files--even from within a 32-bit process--should get
    there. You only mentioned the API, but made no suggestion about what,
    exactly, to use it with...hence I've merely suggested listing .cpl files.
    Is that what you were implying?
     
    Homer J. Simpson, Jan 18, 2009
    #4
  5. Homer J. Simpson

    Carlos Guest

    Re: enumerating control pannel items from 32 bit executable on XP

    Homer,
    As I said before, I am not "that" techie so I am only suggesting a way based
    on what the developer of ZTreeWin told me to convice me about the feasibility
    of what he was achieving with his 32-bit program.
    I don't even know how to use thos API's!
    Maybe the OP can take it from there.
    :)
    Carlos

    "Homer J. Simpson" wrote:

    > > Homer,
    > > 32 bit processes, when doing a simple "dir *.cpl" on \system32 are fooled
    > > by
    > > the OS and redirected to \syswow64.
    > > The workaround I mention in my post allows skipping that restriction.
    > > For example, my main shell for exploring is ZtreeWin.
    > > It is a 32-bit app, it cannot launch 64-bit apps, but it can access both
    > > sys
    > > folders thanks to that workaround.
    > > :)
    > > Carlos

    >
    > Dang. You're absolutely right. I was just looking at the content of the
    > two folders I mentioned, but--obviously--I'm doing this via Explorer, which
    > is 64-bit. "Duh" on me.
    >
    > But...using Wow64DisableWow64FsRedirection() *in conjunction* with
    > enumerating all *.cpl files--even from within a 32-bit process--should get
    > there. You only mentioned the API, but made no suggestion about what,
    > exactly, to use it with...hence I've merely suggested listing .cpl files.
    > Is that what you were implying?
    >
    >
    >
     
    Carlos, Jan 18, 2009
    #5
  6. Homer J. Simpson

    Jim Barry Guest

    sandi_ro wrote:
    > It seems we need some help from inside MS. Any MVP there that can
    > help in this area ? Maybe tere is some simple thing that we are
    > missing.


    32-bit programs running on 64-bit Windows are subject to registry redirection. In particular, [HKLM\Software] is redirected to [HKLM\Software\WOW6432node]. Control panel namespace extensions are registered under [HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace], which is why 32-bit programs don't see 64-bit control panel extensions. And there's no way around it because 64-bit control panels are implemented by 64-bit DLLs, which can't be loaded by 32-bit programs.

    --
    Jim Barry, Microsoft MVP
     
    Jim Barry, Jan 19, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SA

    accessibility in control pannel

    SA, Oct 25, 2003, in forum: Computer Support
    Replies:
    0
    Views:
    486
  2. Carlos
    Replies:
    0
    Views:
    445
    Carlos
    Jan 16, 2009
  3. David B.
    Replies:
    0
    Views:
    515
    David B.
    Jan 20, 2009
  4. Lanwench [MVP - Exchange]
    Replies:
    0
    Views:
    450
    Lanwench [MVP - Exchange]
    Jan 21, 2009
  5. sandi_ro
    Replies:
    2
    Views:
    559
    sandi_ro
    Jan 28, 2009
Loading...

Share This Page