I'm trying to install a Windows Service using a batch file, let's call it "installservice.bat". Inside the file I have the following commands:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe -i ".\MyService.exe" pause
When I excute the batch file (running as administrator on Vista) I get this:
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..
The actual service is located at C:\Services\MyService.exe. What should the ".\MyService.exe" part be for it to function properly?