开发者

install windows service in windows 7 [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_运维知识库 Closed 12 years ago.

i use the code for install Service in XP:

@"%windir%\Microsoft.NET\Framework\v2.0.50727\Path  +@"\service.exe

But in Windows 7 this code is problem


In Windows 7 you have to run the command line as admin for this to work.

To do that, click the Start "orb", type "cmd" as usual but instead of pressing Enter, hold CTRL+SHIFT together then press Enter. Dialog will appear, confirm it and you'll get administrative access and the installation should work as expected.


Normally, I use "installutil.exe -i myAppExe" command for installing. Cant you use this command?


Only an elevated process (it is not enough to be logged into the machine as a member of the Administrators group) can install a service. If you're doing it from the command prompt, make it an elevated one (right clicking the shortcut and choosing Run As Administrator works, as well as @Shadow Wizard's instructions.) If you're doing it in code, the app will need to be elevated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜