Jump to content

I want to start my startup agent by windows services.


Recommended Posts

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.
Link to comment
Share on other sites

  • 1 month later...

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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...