install.bat file (%1 --parameter 1, e.g. install.bat c:\Program Files\)
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i
cd %1
InstallUtil.exe winservice.exe
NET START "your win services display name"
Pause
uninstall.bat file
cd %1
InstallUtil.exe -u winservice.exe
Pause
c# to run the install.bat file
ProgramFilesx86() run the system program file folder path (e.g. "c:\Program File")
using System.Diagnostics;
System.Diagnostics.Process.Start("\"" + ProgramFilesx86() + "\\path\\install.bat\"", parameter1);
Monday, April 27, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment