Переключение на Главную Страницу Страницы: 1 ОтправитьПечать
Обычная тема .wsc и 64-битная винда (число прочтений - 5203 )
ADirks
1c++ developer
1c++ moderator
Отсутствует


А нужны ли мы нам?

Сообщений: 692
Местоположение: Новосибирск
Зарегистрирован: 22. Мая 2006
Пол: Мужской
.wsc и 64-битная винда
10. Ноября 2011 :: 09:32
Печать  
Поставил для интереса вин-2008 x64, получил гранату. В конфигураторе не желают создаваться wsc - ActiveX-ы. А если через cscript скрипт запускаешь - то пожалуйста, создаются.  Чё за фигня?!! Но гугль как обычно выручил: http://blog.dezfowler.com/2007/02/32-bit-windows-script-components-under.html
На всякий случай, задублирую здесь.

Цитата:
32-bit Windows Script Components under 64-bit Windows

We're currently setting up a new suite of 64-bit web and database servers at work all running Windows Server 2003 x64 Edition. We've got quite a few legacy 32-bit Windows Script Components we need to use which by all accounts should run fine in the 32-bit environment provided by WOW64.

Imagine our surprise when, on registering the components, none of them worked - throwing errors at the point of instantiation.

WOW64 is rather an odd beast; residing as it does in it's own SYSWOW64 folder in the Windows directory. This folder essentially contains the 32-bit versions of all the DLLs and things that are available in a 32-bit version of Windows. The caveat being that in order to get your 32-bit fare to work you need to call on the services of these SYSWOW64 versions rather than the ones in the folder still called SYSTEM32 (note the stupid naming convention).

When registering WSC's you actually register the hosting service, scrobj.dll with regsvr32.exe, passing the path to your WSC as the command line for scrobj.dll using the /i switch e.g.

regsvr32 /i:"C:\Components\Display.wsc" "C:\WINDOWS\SYSTEM32\scrobj.dll"

Oddly the Register option in the file association for WSC's seems to mix versions, calling the 64-bit version of regsvr32.exe and the 32-bit version of scrobj.dll.

"C:\WINDOWS\system32\REGSVR32.EXE" /i:"%1" "C:\WINDOWS\SYSWOW64\scrobj.dll"

I'm not sure of the significance of this mixed version thing, however it didn't work in our case so we added a 32-bit Register option which called the 32-bit versions of both files from the SYSWOW64 folder e.g.

"C:\WINDOWS\SYSWOW64\REGSVR32.EXE" /i:"%1" "C:\WINDOWS\SYSWOW64\scrobj.dll"

and a 32-bit Unregister e.g.

"C:\WINDOWS\SYSWOW64\REGSVR32.EXE" /u /n /i:"%1" "C:\WINDOWS\SYSWOW64\scrobj.dll"
  
Наверх
 
IP записан
 
artbear
1c++ developer
1c++ moderator
Отсутствует


Эх, дайте что-нибудь новенькое
да полезное потести

Сообщений: 6303
Местоположение: Москва
Зарегистрирован: 19. Мая 2006
Пол: Мужской
Re: .wsc и 64-битная винда
Ответ #1 - 10. Ноября 2011 :: 11:38
Печать  
У  меня в ВинХП Сп3 уже они не создаются Печаль
Года 2, наверное, не работает.
  

OpenConf developer :: http://openconf.1cpp.ru&&FormEx developer :: http://formex.dorex.ru&&1C++ active developer && tester :: www.1cpp.ru
Наверх
GTalkSkype/VoIPICQ  
IP записан
 
firefox
YaBB Newbies
*
Отсутствует


1C++ rocks!

Сообщений: 3
Зарегистрирован: 06. Августа 2017
Re: .wsc и 64-битная винда
Ответ #2 - 08. Июня 2019 :: 23:56
Печать  
Оставлю для памяти самый простой вариант:
При установке на x64 для регистрации dll и wcs нужно перед запуском, в regall.bat заменить:
====
cscript //nologo regfiles.js /I %1 %2

на

C:\Windows\SysWOW64\cscript //nologo regfiles.js /I %1 %2
====
После этого сделать первый запуск конфигуратора под административными правами.

Для отмена регистрации заменить в unregall.bat
====
cscript //nologo regfiles.js /U %1 %2

на

C:\Windows\SysWOW64\cscript //nologo regfiles.js /U %1 %2
====


  
Наверх
 
IP записан
 
Переключение на Главную Страницу Страницы: 1
ОтправитьПечать