J'essaie d'installer un service Windows à l'aide d'un fichier de commandes, appelons-le "InstallService.bat". Dans le fichier, j'ai les commandes suivantes: Lorsque j'excute le fichier de commandes (exécutant en tant qu'administrateur sur Vista), je reçois ceci: p> Exception occurred while initializing the installation:
System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Win
dows\system32\MyService.exe' or one of its dependencies. The system cannot f
ind the file specified..
3 Réponses :
Pourquoi ne pas simplement nourrir l'installation du chemin complet? P>
Copier le fichier BAT My Service.exe Dossier et exécuter, vous n'obtiendrez aucune erreur. P>
Juste au cas où quelqu'un d'autre vient ici pour cette erreur ... Lorsque vous exécutez PLANTUTIL.EXE, faux ... p> droite ... p> C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe "C:\Users\joeblow\Documents\Visual Studio 2010\Projects\WindowsService1\WindowsService1\bin\Debug\WindowsService1.exe"