Jump to content
Sign in to follow this  
FATIHTALI

I want to start my startup agent by windows services.

Recommended Posts

FATIHTALI

I made a small agent. Program comparing pc and server sides ini file. I want to use this program in windows services. Is any one has experience for it.

I need that because If I can start my program in windows services my program will work system account also it will work admin rights.

Thanks.

Fatih

.

#include <file.au3>
#Include <Array.au3>
Dim $serverARRAY
Dim $pcARRAY
            $USERNAME = "xxxx"
            $DOMAIN = "xxxx"
            $PASSWORD ="xxxx"
            $tarih =@MDAY&"."&@MON&"."&@YEAR&"."&@HOUR&":"&@MIN&":"&@SEC
FileWriteLine("\\server\agent.log",""&@ComputerName&".tofas.local,"&@OSVersion&","&@OSServicePack&","&$tarih);---------------hearth beet    
        
    If Not _FileReadToArray("\\server\kurulacaklar.ini",$serverARRAY) Then
    MsgBox(16,"Bağlantı Hatası", "Server Bilgileri Şu an Okunamıyor. Program Bir sonraki açılışta tekrar bağlantıyı deneyecek.")
    Exit
    EndIf
        if not FileExists("C:\SISTEM\kurulumlar.ini") Then
        DirCreate ( "C:\SISTEM" )
        _FileCreate("C:\SISTEM\kurulumlar.ini")
        EndIf
                If Not _FileReadToArray("C:\SISTEM\kurulumlar.ini",$pcARRAY) Then
                        Exit
                    EndIf
        
            For $x = 5 to $serverARRAY[0]
            $Flag = 0
            For $y = 0 to $pcARRAY[0]       
            If $serverARRAY[$x]=$pcARRAY[$y] then 
;-----güncelleme yok
;MsgBox(0, "Line read:", $pcARRAY[$y])
            $Flag = 1
            ExitLoop
            endif 
            Next
            if $flag = 0 then
            RunASWait($USERNAME,$DOMAIN,$PASSWORD,0,$serverARRAY[$x], @SystemDir)   
            Endif
            Next
            Exit
Edited by FATIHTALI

Startup Agent It is my small Startup Agent. You can install programs on startup Domain pc without Admin rights.

Share this post


Link to post
Share on other sites
Andreik

Read FAQ about running a script as service.


When the words fail... music speaks

Share this post


Link to post
Share on other sites
FATIHTALI

Hello. I have new question.

I made my program. It is working well.

My program is working every restart.

Can I run my program from a admin console like that.

Program can listen from network when program reveive signal it will work.

It can be possible?

Thanks Fatih


Startup Agent It is my small Startup Agent. You can install programs on startup Domain pc without Admin rights.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.