Hallo. ich hab folgende Frage:
Warum wird die pfx-Datei nicht importiert??
option explicit
'on error resume next
dim TemplateName, importName, importFolderPath, verbose, passwort, passwortcommit, WshNetwork, test
Set WshNetwork = wscript.CreateObject("WScript.Network")
passwort = inputbox ("Bitte geben Sie ein Passwort","Passwort eingeben")
passwortcommit = inputbox ("Bitte geben Sie nochmals das Passwort ein","Passwort bestätigen")
importFolderPath = "C:\Documents and Settings\"+WshNetwork.UserName+"\Desktop\"
importName = "test.pfx"
test = importFolderPath + importName
if (passwort = passwortcommit) then
wscript.echo "Passwort ident!"
else
wscript.echo "Passwort nicht ident. Starten Sie die Anwendung erneut!"
wscript.quit
end if
dim certObj, certStore
CONST CAPICOM\_KEY\_STORAGE\_DEFAULT = 1
CONST CAPICOM\_CURRENT\_USER\_KEY = 1
set certStore = wscript.CreateObject("CAPICOM.Store")
certStore.open 2, "MY", 0
for each certObj in certStore.Certificates
certObj.Load test, passwortcommit, CAPICOM\_KEY\_STORAGE\_DEFAULT, CAPICOM\_CURRENT\_USER\_KEY
Next
set certStore = Nothing
on error goto 0
der for each durchlauf funktioniert. jedoch wird die datei nie importiert?? warum den nicht…syntax-fehler oder dergleichen kommen auch nicht…hab ich sonst was falsch?
danke und gruss,
sebastian