Sign in to follow this  
Followers 0
yehia

can we make a windows service start at the startup

8 posts in this topic




@startupDir

I don't believe that's the registry

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

is there any way or function to make a windows service start at the startup without adding it to the registry "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" key?

yes and no, like radio eriwan mentioned.

1) you should start real services in HKLM\SYSTEM\CurrentControlSet\Services

2) you should start exe files in the regkey mentioned above

3) you can use Srvany.exe to start normal exe file as service to have normal services access, as start, stop .....

4) you can start an exe file by creating a sheduled task, which runs at system startup. see schtasks /?

I think this are the only possibilities. ;-((

;-))

Stefan

Edited by 99ojo

Share this post


Link to post
Share on other sites

You can also do something like this:

RunWait("sc start OpenVPNService", '', @SW_HIDE)

sc.exe is integrated windows command.. Compile the code, put the autoit exe to Start,Programs,Startup folder.. so each time any user will logon, service will start..

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

im sure there is another way, but how ...

btw u said "1) you should start real services in HKLM\SYSTEM\CurrentControlSet\Services"

so the service will auto start up with the windows start up? (same as spooler)

if thats correct tell meh how

Edited by yehia

Share this post


Link to post
Share on other sites

Navigate to HKLM\SYSTEM\CurrentControlSet\Services\YourService, change the binary value "Start" to 2 (in hexadecimal view)...

or in AutoIt:

RegWrite("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\YourService", "Start", "REG_DWORD", "0x00000002")

Share this post


Link to post
Share on other sites

Check FAQ.


When the words fail... music speaks

Share this post


Link to post
Share on other sites

Navigate to HKLM\SYSTEM\CurrentControlSet\Services\YourService, change the binary value "Start" to 2 (in hexadecimal view)...

or in AutoIt:

RegWrite("HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\YourService", "Start", "REG_DWORD", "0x00000002")
thanks alot thats really what i wanned to know

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0