Création shortcourt

ovi8 Messages postés 1 Date d'inscription mercredi 17 septembre 2008 Statut Membre Dernière intervention 17 septembre 2008 - 17 sept. 2008 à 10:28
PCPT Messages postés 13272 Date d'inscription lundi 13 décembre 2004 Statut Membre Dernière intervention 3 février 2018 - 18 sept. 2008 à 16:02
Bonjour à tous,

J'ai trouvé sur internet un petit script qui permet de créer un raccourci.
Jusqu'a la pas de problème je l'ai modifier sans problème mais la ou sa quoince
mtn c'est que dans le oLink.targetPath = "mon chemin" j'ai besoin de passer des paramètres ftp car c'est un
raccourci pour une connexion ftp automatique.
Voici le script:
 Set oWS = WScript.CreateObject("WScript.Shell")
   sLinkFile = "C:\MyShortcut.LNK"
   Set oLink = oWS.CreateShortcut(sLinkFile)
 
   oLink.TargetPath = "C:\winscp\winscp416.exe"
   ' oLink.Arguments = ""
   ' oLink.Description = "Winscp"
   ' oLink.HotKey = "ALT+CTRL+F"
   ' oLink.IconLocation = "C:\winscp\winscp416.exe, 2"
   ' oLink.WindowStyle = "1"
   ' oLink.WorkingDirectory = "C:\winscp"
   oLink.Save

Et moi j'aimerai que le raccourci se crée mais avec ces paramaètres en plus:
 Set oWS = WScript.CreateObject("WScript.Shell")
   sLinkFile = "C:\MyShortcut.LNK"
   Set oLink = oWS.CreateShortcut(sLinkFile)
 
   oLink.TargetPath = "C:\winscp\winscp416.exe" user:password@ftp.blabla.com
   ' oLink.Arguments = ""
   ' oLink.Description = "Winscp"
   ' oLink.HotKey = "ALT+CTRL+F"
   ' oLink.IconLocation = "C:\winscp\winscp416.exe, 2"
   ' oLink.WindowStyle = "1"
   ' oLink.WorkingDirectory = "C:\winscp"
   oLink.Save

Quelqu'un a-t-il une idée ?

1 réponse

PCPT Messages postés 13272 Date d'inscription lundi 13 décembre 2004 Statut Membre Dernière intervention 3 février 2018 47
18 sept. 2008 à 16:02
salut,

et comme çà?

  oLink.TargetPath = "C:\winscp\winscp416.exe " & """user:password@ftp.blabla.com"""

++<hr size="2" width="100%" />Prenez un instant pour répondre à [sujet-SONDAGE-POP3-POUR-CS_769706.aspx ce sondage] svp
0
Rejoignez-nous