none
WSF file creating 32-bits ActiveX on Windows 7 64-bits

    Question

  • I need to run some WSF script files wich call 32-bits ActiveX objects on windows 7 64-bits platform.

    If I invoke the 32-bits version of wscript.exe (in SysWOW64) from a command prompt, it works fine.

    I duplicate the WSFFile key in the registry with a new WSFFile32 key and replace System32 by SysWow64.

    If I associate the .wsf extension to WSFFile32, it works fine by drag&drop in the file explorer.

    If I create a new .wsf32 entry in HKCR with an association to WSFFile32, and rename my files to .wsf32 extension, I get an error message from Windows Script Host that says that there is no script engine for .wsf32 extension

    I don't want to change the default .wsf association, I think that using a separate .wsf32 extension is better.

    Any one can help ?

    • Moved by Bill_Stewart Friday, August 10, 2012 2:50 PM Move to more appropriate forum (From:The Official Scripting Guys Forum!)
    Friday, August 10, 2012 2:10 PM

Answers

  • Hi ,

    It is expected. Is there bussiness consideration that you should do this?

    Anther workaround (I assume that you are using vbscript engine) but not a good idea.

    Run the following command line to resigter file stype wsf2 with vbscript engine. 

    Assoc .wsf2=myCustomeFiletype

    Ftype myCustomeFiletype=C:\windows\syswow64\wscript.exe %1 //e:VBscript

    Note: Please remove the following line from the script file.  1. <Job id="...:"> 2.</job> 3. <script language="vbscript"> 4. </script>

    See if it helps. 


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.



    Friday, August 17, 2012 9:56 AM

All replies

  • Hi,

    This is a general Windows OS file-association question, not a scripting question. Moving to more appropriate forum.

    Bill

    Friday, August 10, 2012 2:49 PM
  • Hi,


    Based on my research, please follow the steps in File Types to register the file type and see how it works.


    Hope this helps.


    Jeremy Wu

    TechNet Community Support

    Tuesday, August 14, 2012 6:11 AM
  • Hi,

    thanks for your help

    What do you mean by "follow the steps in File Types" (I'm on Windows 7, there is no File Types tab)

    I created a new file type "WSFFile32" pointing to wscript.exe in SysWow64, and associated my .wsf32 extension with this new file type. It doesn't work.

    I tried thru Control Panel>Programs>Default Programs , it doesn't work

    Always the same message from Windows Script Host, saying that there is no script engine for the .wsf32 extension


    Michel78

    Tuesday, August 14, 2012 8:53 AM
  • Hi,


    Sorry for the mistake, I mean the document:


    File Types

    http://msdn.microsoft.com/en-us/library/windows/desktop/cc144148(v=vs.85).aspx


    Regards.


    Jeremy Wu

    TechNet Community Support

    Tuesday, August 14, 2012 9:05 AM
  • Sorry, this isn't a file-association question, because if I run the command "\windows\syswow64\wscript myscript.wsf32", I get the same message


    Michel78

    Tuesday, August 14, 2012 9:37 AM
  • Hi ,

    It is expected. Is there bussiness consideration that you should do this?

    Anther workaround (I assume that you are using vbscript engine) but not a good idea.

    Run the following command line to resigter file stype wsf2 with vbscript engine. 

    Assoc .wsf2=myCustomeFiletype

    Ftype myCustomeFiletype=C:\windows\syswow64\wscript.exe %1 //e:VBscript

    Note: Please remove the following line from the script file.  1. <Job id="...:"> 2.</job> 3. <script language="vbscript"> 4. </script>

    See if it helps. 


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.



    Friday, August 17, 2012 9:56 AM