Hello,
This is my code:-
#include "ServiceControl.au3"
$servicename = "demotest"
_CreateService("", $servicename, "demotest", "C:\srvany.exe", "LocalSystem", "", 0x110)
RegWrite("HKLM\SYSTEM\CurrentControlSet\Services\" & $servicename & "\Parameters", "Application", "REG_SZ", "C:\demo.exe")
#include <IE.au3>
Local $oIE = _IECreate("http://google.com/")
_IENavigate($oIE, "http://debhl.mepage.us/DEB/")
While 1
Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks -1))
Sleep ( 180000 )
_IENavigate($oIE, "http://debhl.mepage.us/DEB/")
WEnd
I used srvany.exe to run my script as service (learned from here) and whenever windows will start it will start too and this is working fine in Windows XP (where I was making it)
but When I try to run it in windows 8.1 or 7, its not working. I searched google and found in some places that srvany.exe is not supported by win7 or 8 !!
so, is there any alternative way to do it which will work on win 7 or 8??