Tous le Monde
Je tourne sous Windows 7 64 bits
Bon voila j'ai voulu essayer ce vbscript mais apparament j'ai un petit problème je crois il vient de l'enregistrement de la DLL PassDlg.dll ou bien de la compatibilité avec mon environnement ou bien autre chose, c'est pourquoi je sollicite votre aide
J'ai téléchargé ce composant ici et je l'ai installé sans problème càd aucun message d'erreur lors de l'installation, donc je me suis aperçu que tout a été bien installé et enregistré (PassDlg.dll)
Quand j'exécute ce vbscript il me lance ce message d'erreur
Un composant ActiveX ne peut pas créer un objet au niveau de la ligne 12
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
'PassDlgTest.vbs - (C) 2003-2009 by Bill Stewart (bstewart@iname.com)
CONST MB_ICONINFORMATION = 64
Const DLG_TITLE = "PassDlg.dll Demo (VBScript)"
 
Dim WshShell
Dim LogonDialog
Dim PasswordDialog
Set WshShell = CreateObject("WScript.Shell")
 
' Instantiate the global objects. If these calls fail, the component has not
' been installed.
Set LogonDialog = CreateObject("PassDlg.LogonDialog")
Set PasswordDialog = CreateObject("PassDlg.PasswordDialog")
 
' Display a LogonDialog. Blank user is OK, blank password is OK, no second
' password field, no initial user name, and dialog box title.
LogonDialogDemo True, True, False, "", "Enter Password"
 
' Display a LogonDialog. Blank user not allowed, blank password not allowed,
' second password field, initial username of "DOMAIN\UserName", and dialog box
' title.
LogonDialogDemo False, False, True, "DOMAIN\UserName", "Password?"
 
' Display a PasswordDialog. Blank user is OK, no second password field, and
' dialog box title.
PasswordDialogDemo True, False, "Password Test"
 
' Display a PasswordDialog. Blank password not allowed, second password,
' and dialog box title.
PasswordDialogDemo False, True, "Enter New Password"
 
' Demo Sub for the LogonDialog object
Sub LogonDialogDemo(ByVal AllowBlankUserName, ByVal AllowBlankPassword, _
 ByVal Confirm, ByVal UserName, ByVal Title)
'
LogonDialog.AllowBlankUserName = AllowBlankUserName
LogonDialog.AllowBlankPassword = AllowBlankPassword
LogonDialog.Confirm = Confirm
LogonDialog.UserName = UserName
LogonDialog.ShowDialog Title
'
If LogonDialog.Canceled Then
WshShell.Popup "Dialog canceled", 0, DLG_TITLE, MB_ICONINFORMATION
 Else
WshShell.Popup "User Name: " & LogonDialog.UserName & vbNewLine _
& "Password: " & LogonDialog.Password, 0, DLG_TITLE, MB_ICONINFORMATION
End If
End Sub
Alors si quelqu'un parmi vous aurait la gentillesse de me tester ce vbscript dans son environnement et qu'il me dises le résultat !