Erreur shell

cs_bossou Messages postés 71 Date d'inscription vendredi 2 juin 2006 Statut Membre Dernière intervention 7 octobre 2011 - 4 nov. 2009 à 17:01
lolokun Messages postés 1241 Date d'inscription mardi 10 octobre 2006 Statut Membre Dernière intervention 27 août 2013 - 5 nov. 2009 à 09:06
Bonjour.
J'essai d'exécuter un script shell en faisant appel à la fonction Run. mais au cours de l'exécution j'obtiens le message suivant : Cet objet ne gère pas cette propriété ou cette méthode. et la ligne qui est indiquée est :

objShell2.Run CryptoPath + "/crypto.cmd < " + CryptoPath + "/list-certificate.txt >> """ + CertFileName + """", 1,True

j'ai beau cherché sur les forum je ne parviens pas à résoudre ce problème. aidez moi SVP

j'ai mis un bout de mon code pour plus d'info. Merci


Dim SQLPath
SQLPath = "G:/DSI/3-APPLICATIONS/BaseTiersOracle/Crypto"

Dim PinPath
PinPath = "G:/DSI/3-APPLICATIONS/BaseTiersOracle/Crypto"

Dim CertificatPath
CertificatPath = "G:/DSI/3-APPLICATIONS/BaseTiersOracle/Certificat"

Dim CryptoPath
CryptoPath = "G:/DSI/3-APPLICATIONS/BaseTiersOracle/Crypto"

Dim SQLFileName
SQLFileName = SQLPath + "/" + "SQL_certificat.txt"

Dim fs
Set fs= CreateObject("Scripting.FileSystemObject")

Dim SQLfile
Set SQLfile= fs.CreateTextFile(SQLFileName, True)


Dim CertFileName
Set CertFileName = fs.CreateTextFile(CertificatPath + "/" +" <%Response.Write(NumClef);%> "+" <%Response.Write(NomUser);%>"+ ".txt", True)

CertFileName.Writeline("User : " +" <%Response.Write(NomUser);%>")
CertFileName.Writeline("Pin code : " + " <%Response.Write(NumPin);%>")


MsgBox("Inserer la clef USB"+ " <%Response.Write(NumClef);%>")

Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run CryptoPath + "/crypto.cmd < " + CryptoPath + "/input-certificate.txt ", 1

Wscript.Sleep(33000)

Dim objShell2
Set objShell2 = CreateObject("WScript.Shell")
objShell2.Run CryptoPath + "/crypto.cmd < " + CryptoPath + "/list-certificate.txt >> """ + CertFileName + """", 1,True

1 réponse

lolokun Messages postés 1241 Date d'inscription mardi 10 octobre 2006 Statut Membre Dernière intervention 27 août 2013 7
5 nov. 2009 à 09:06
Bonjour,

Es-tu sûr de la commande qui est lancée?
Déclare une variable com1 par exemple, égale à CryptoPath + "/crypto.cmd < " + CryptoPath + "/list-certificate.txt >> """ + CertFileName + """"

Affiche là avant de la faire exécuter pour vérifier qu'il ne manque pas des espaces..J'ai l'impression qu'il y a des guillemets en trop..
Si elle te paraît correcte, est-ce que ça fonctionne en la lançant directement depuis l'invité de commande?


L'expérience, c'est une connerie par jour, mais jamais la même..
0
Rejoignez-nous