PDA

View Full Version : حرفه ای: مشکل با اجرای برنامه هنگام بالا آمدن سیستم



ferankyy
یک شنبه 21 فروردین 1390, 10:33 صبح
با سلام
من یه برنامه نوشتم که برای اجرا شدن هنگام بالا آمدن ویندوز برنامه ام رو داخل شاخه Run در رجیستری قرار دادم
حالا یه مشکلی هست :
داخل گیم نت ها هنگام بالا آمدن سیستم به جای اینکه Explorer اجرا بشه ، برنامه مخصوص گیم نت اجرا میشه و به همین دلیل دیگه برنامه های داخل Start Up اجرا نمیشن .

لطف کنید یه را حلی بدید :قلب:

ژوپیتر
یک شنبه 21 فروردین 1390, 10:46 صبح
در اینگونه موارد، برنامه ها به صورتی که شما در حال اجرای اون هستید بر اساس اولویتهای تعیین شده در ویندوز اجرا می شوند وشما نمی تونید برنامه خودتون رو با این روش قبل از برنامه گیم نت اجرا کنید.
برای اجرای مواردی شبیه این، از سرویسها استفاده می کنند که حتی بعضی نیاز به لاگ این هم ندارند و همراه با لوگوی ولکام اجرا می شوند.

http://en.wikipedia.org/wiki/Windows_service

r00tkit
یک شنبه 21 فروردین 1390, 10:51 صبح
سرویس ها UI ندارن

با رجیستری به ان چیزی که می خوامی می رسی ( با جایگذینی برنامت با Userinit.exe )

ژوپیتر
یک شنبه 21 فروردین 1390, 10:57 صبح
Developing a Windows service

A Windows Service is created using development tools such as Microsoft Visual Studio (http://en.wikipedia.org/wiki/Microsoft_Visual_Studio) or Embarcadero Delphi (http://en.wikipedia.org/wiki/Embarcadero_Delphi) . Windows provides an interface called the Service Control Manager (http://en.wikipedia.org/wiki/Service_Control_Manager) that manages the starting and stopping of services. An application that wants to be a service needs to first be written in such a way that it can handle start, stop, and pause messages from the Service Control Manager. Then, in one or more API (http://en.wikipedia.org/wiki/Application_programming_interface) calls, the name of the service and other attributes such as its description are registered with the Service Control Manager. Although typically services do not have a user interface, developers can add forms (http://en.wikipedia.org/wiki/Form_%28programming%29) and other UI (http://en.wikipedia.org/wiki/User_interface) components. In this case, the "Allow service to interact with desktop" should be checked on the Logon tab in the Service properties dialog (though care should be taken with this approach as this can cause a security risk since any logged in user would be able to interact with the service).

اینکه سرویس ها به طور معمول UI ندارند به این معنا نیست که نمی توانند UI داشته باشند، سرویسها هم می توانند UI داشته باشند.

ferankyy
یک شنبه 21 فروردین 1390, 11:27 صبح
ضمن تشکر از پاسخ شما دوستان
اگه میشه یه نمونه کد یا Sampel بزارید

ژوپیتر
یک شنبه 21 فروردین 1390, 11:32 صبح
http://www.codeproject.com/KB/system/WindowsService.aspx

http://www.codeproject.com/KB/dotnet/simplewindowsservice.aspx