Menu

#383 nsExec & ExecDos - Support DisableX64FSRedirection feature

2.0 Series
closed
Plugins (61)
5
2008-02-16
2007-08-21
Anonymous
No

Because of the implementation of the nsExec plugin functions, it is not possible to benefit from the DisableX64FSRedirection feature (see x64.nsh). Same thing for ExecDos plugin.

This limitation is in effect because the DisableX64FSRedirection feature is only applied to the current thread.

Users currently have to use ExecWait function which displays the non-professional-looking command window.

I recommend altering the implementation to take account of the "64 bit file system redirection" feature.

A real world example: to insure IPv6 availability on x64 pre-Vista systems,
'"$SYSDIR\netsh.exe" interface ipv6 install'
Fails because the 32-bit netsh.exe is not allowed to install IPv6 protocol on x64 machines.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    !ifdef BUILD_OPT_X64
    ; Run 64-bit netsh.exe binary on 64-bit systems because 32-bit netsh fails
    ; to install ipv6
    ; Use ExecWait because it uses current thread for execution.
    ;
    ${DisableX64FSRedirection}
    ExecWait '"$SYSDIR\netsh.exe" interface ipv6 install'
    ${EnableX64FSRedirection}
    !else
    NsExec::Exec '"$SYSDIR\netsh.exe" interface ipv6 install'
    !endif

     
  • Amir Szekely

    Amir Szekely - 2008-02-16

    Logged In: YES
    user_id=584402
    Originator: NO

    Also reported in bug #1889317.

     
  • Amir Szekely

    Amir Szekely - 2008-02-16
    • assigned_to: nobody --> kichik
    • status: open --> closed
     
  • Amir Szekely

    Amir Szekely - 2008-02-16

    Logged In: YES
    user_id=584402
    Originator: NO

    I've implemented a solution for this that'd simply skip the extra process when running under WOW64. This way, when executing the real process, CreateProcess will be affected by the installer's redirection settings.

     
  • Amir Szekely

    Amir Szekely - 2008-02-16
    • status: closed --> open
     
  • Amir Szekely

    Amir Szekely - 2008-02-16

    Logged In: YES
    user_id=584402
    Originator: NO

    Never mind, it doesn't work. CreateProcess doesn't obey file system redirection options. It always redirects. Fun.

     
  • Amir Szekely

    Amir Szekely - 2008-02-16

    Logged In: YES
    user_id=584402
    Originator: NO

    Actually, it does. Was just a bug in my code...

    The new version works fine.

     
  • Amir Szekely

    Amir Szekely - 2008-02-16
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB