Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

wsh 32 vers 64

15 réponses
Avatar
Jean Pierre Daviau
Bonjour à tous et à toutes,

Les objets com pour wsh ne semble pas fonctionner sur Vista 64 bits. Que
faire?

J'ai comme livre:
WSeincdreotwss® Scripting ®
Tobias Weltner
Windows® Scripting Secrets®


Cordialement,


Jean Pierre Daviau

-------
HP Pavilion Elite m9525f Desktop PC
Vista Édition Familiale Premium SP1 64 bits

5 réponses

1 2
Avatar
Jean Pierre Daviau
> Sur une plateforme x64 :

Le dossier syswow64 contient les binaires 32 bits
Le dossier system32 contient les binaires 64 bits




Ajoutez un X au bon endroit:

c'est l'inverse:

c'est comme c'est:
Avatar
Gilles LAURENT [MVP]
"Jean Pierre Daviau" wrote:

> Sur une plateforme x64 :
>
> Le dossier syswow64 contient les binaires 32 bits
> Le dossier system32 contient les binaires 64 bits
>

Ajoutez un X au bon endroit:

c'est l'inverse:

c'est comme c'est:




Pardon mais je ne comprends pas :-(
Pouvez-vous être plus clair ?

--
Gilles LAURENT
MVP Windows Server - Admin Frameworks
http://glsft.free.fr
Avatar
Jean Pierre Daviau
"Gilles LAURENT [MVP]" a écrit dans le message de
news:
"Jean Pierre Daviau" wrote:

> Sur une plateforme x64 :
>
>





Ce n'est pas plutôt:
Le dossier syswow64 contient les binaires 64 bits?
Le dossier system32 contient les binaires 32 bits?
Avatar
Gilles LAURENT [MVP]
"Jean Pierre Daviau" wrote:

Ce n'est pas plutôt:
Le dossier syswow64 contient les binaires 64 bits?
Le dossier system32 contient les binaires 32 bits?



Non non, c'est l'inverse ;-)

syswow64=Windows 32 bits On Windows 64 bits
system32 contient les binaires 64 bits sur x64
sysnative est un alias de system32 pour les programme 32 bits souhaitant
utiliser le dossier 64 bits system32 sans être intercepté par le redirecteur.
En effet, un programme 32 bits qui utilise system32 sera automatiquement
redirigé vers le dossier syswow64

--
Gilles LAURENT
MVP Windows Server - Admin Frameworks
http://glsft.free.fr
Avatar
Jean Pierre Daviau
<Les objets com pour wsh ne semble pas fonctionner sur Vista 64 bits. Que
faire?
<J'ai comme livre:
<WSeincdreotwss® Scripting ®
<Tobias Weltner
<Windows® Scripting Secrets®

J'ai réussi avec expand -r *.??_ à installer dans le dossier.

C:WINDOWSSYSWOW64WSH
| comcat.dl
| comctl32.oc
| COMCTL32.OCX
| iconhandler.oc
| iconhandler.ocx
| jcb.ocx
| listview.oc
| modeless.oc
| msstkprp.dl
| msvbvm50.dl
| msvbvm50.dll
| oleaut32.dl
| olepro32.dl
| stdole2.tl
------------------------------------------------------
Le script se déroule normalement une boîte de ligne de progression apparaît
et C:WindowsSyswow64wscript.exe 22-2.vbs scanne le disque c puis:

Ligne 77
caractère 6
chemin d'accès introuvable.
Code 800a004c

Click oh le script cesse mais wscript.exe *32 demeure dans le gestionnaire
de tâche
Je termine le processus.
==================================== 22-2.VBS
==================================================
1 ' 22-2.VBS
2 ' for %i in (22*.vbs) do ( C:WindowsSyswow64wscript.exe%i & pause)
3 ' for %i in (*) do (regsvr32 "C:WindowsSysWOW64wsh%i" & pause)
4 ' regserv32 C:WindowsSysWOW64wshiconhandler.ocx
5 '---the following lines have been added to ensure all required COM objects
are available on your system.
6 ' script uses the following components:
7 ' icon.handler
8 ' scripting.filesystemobject
9 ' wscript.shell
10 ' modeless.dialog
11
12 CheckCOM
13 '---end of COM-object checking code---
14
15
16 set tool = CreateObject("icon.handler")
17 set fs = CreateObject("Scripting.FileSystemObject")
18 set wshshell = CreateObject("WScript.Shell")
19 set dlg = WScript.CreateObject("modeless.dialog", "event_")
20
21 ' define variables:
22 iconlist = "C:UsersJean PierreDesktopiconlist.txt"
23 list = ""
24 quit = false
25 iconfilecount = 0
26 icons = 0
27
28 ' open icon list file
29 set list = fs.CreateTextFile(iconlist, true)
30
31 ' show modal window
32 ' everything else is handled by event_WakeUp
33 dlg.ShowProgressDialog
34
35 ' close file
36 list.close
37
38 wshshell.run """" & iconlist & """"
39
40 sub event_WakeUp
41 ' will be executed the moment your modal dialog becomes visible
42 ' search all local hard drives
43 for each drive in fs.Drives
44 if quit then
45 ' make sure to display this message!
46 ' otherwise your script won't find back to the
47 ' starting process!
48 wshshell.Popup "Interrupted search...", 1
49 dlg.CloseDialog
50 exit sub
51 end if
52 if drive.isReady and drive.DriveType=2 then
53 SearchFolder drive.RootFolder
54 end if
55 next
56
57 ' make sure to display this message!
58 ' otherwise your script won't find back to the
59 ' starting process!
60
61 wshshell.Popup "Done!", 1
62 dlg.CloseDialog
63 end sub
64
65 sub event_QuitNow
66 quit = true
67 end sub
68
69
70 sub SearchFolder(folderobj)
71 ' don't search recycle bin
72 if lcase(folderobj.name) = "recycled" then exit sub
73 if lcase(folderobj.name) = "dllcache" then exit sub
74
75 ' search for icons and create list
76 counter = 0
77 filecount = folderobj.files.count
78 drv = folderobj.Drive.Driveletter
79
80 for each file in folderobj.files
81 if quit then exit sub
82
83 counter = counter +1
84 percent = Fix(counter * 100/filecount)
85
86 dlg.WriteDialog "Scanning Drive " & drv & vbCr _
87 & vbCr & folderobj.path & vbCr & file.name _
88 & vbCr & "found " & iconfilecount _
89 & " icon files and " & icons & " icons."
90 dlg.SetProgress percent
91
92 dlg.HandleEvent
93 ' number of icons stored in file:
94 iconcount = tool.GetIconNumber(file.path)
95
96 if iconcount>2 then
97 iconfilecount = iconfilecount + 1
98 icons = icons + iconcount
99 list.WriteLine iconcount & vbTab & file.path
100 end if
101 next
102 for each subfolder in folderobj.subfolders
103 if quit then exit sub
104 SearchFolder subfolder
105 next
106 end sub
107
108
109 ' --- the following code had been automatically added to ensure all
required COM objects are installed.
110 function COMExists(name)
111 ' checks whether a specific COM object is installed on
112 ' your local machine
113 set cwsh = CreateObject("WScript.Shell")
114 on error resume next
115 dummy = cwsh.RegRead("HKCR" & name & "")
116 if err.number<>0 then
117 COMExists = false
118 else
119 COMExists = true
120 end if
121 end function
122
123 sub CheckCOM
124 if not COMExists("icon.handler") then
125 msg="COM-Object ""icon.handler"" is required. This object is currently
not installed on your system." & vbCr
126 msg = msg & "Install the ICONHANDLER component from CD" & vbCr
127 MsgBox msg, vbExclamation
128
129 end if
130
131 if not COMExists("scripting.filesystemobject") then
132 msg="COM-Object ""scripting.filesystemobject"" is required. This object
is currently not installed on your system." & vbCr
133 msg = msg & "Reinstall the Windows Scripting Host!" & vbCr
134 MsgBox msg, vbExclamation
135
136 end if
137
138 if not COMExists("wscript.shell") then
139 msg="COM-Object ""wscript.shell"" is required. This object is currently
not installed on your system." & vbCr
140 msg = msg & "Reinstall the Windows Scripting Host!" & vbCr
141 MsgBox msg, vbExclamation
142
143 end if
144
145 if not COMExists("modeless.dialog") then
146 msg="COM-Object ""modeless.dialog"" is required. This object is
currently not installed on your system." & vbCr
147 msg = msg & "Install the MODELESS component from CD" & vbCr
148 MsgBox msg, vbExclamation
149
150 end if
151
152 end sub
153 '--- end of COM object checking code
154
155 ' (C) 2000 by Dr. T. Weltner - all rights reserved.
156

---------------------------------
2-2-.vbs ------------------------------
1 2