Jump to content

Recommended Posts

Posted

Hi im having a problem with Windows 7 64 bits system. I wrote a script to sync my active directory servers and when im lauching the application with Scite everything work fine. When im lauching the application with the compile exe it dont work. I join you the 2 output of the result

Here is the script i wrote. Thanks for your help !

; Script Start - Add your code below here

FileDelete("" & @ScriptDir & "\RepAD_Result.txt")

RunWait(@ComSpec & " /c " & "repadmin /sync dc=ville,dc=xxx,dc=qc,dc=ca Server1 180be1fb-12eb-4490-853d-e67c85f9d48b > """ & @ScriptDir & "\RepAD_Result_temp.txt""","",@SW_HIDE)

WriteLog()

RunWait(@ComSpec & " /c " & "repadmin /sync dc=ville,dc=xxx,dc=qc,dc=ca Server2 180be1fb-12eb-4490-853d-e67c85f9d48b > """ & @ScriptDir & "\RepAD_Result_temp.txt""","",@SW_HIDE)

WriteLog()

RunWait(@ComSpec & " /c " & "repadmin /sync dc=ville,dc=xxx,dc=qc,dc=ca Server3 180be1fb-12eb-4490-853d-e67c85f9d48b > """ & @ScriptDir & "\RepAD_Result_temp.txt""","",@SW_HIDE)

WriteLog()

RunWait(@ComSpec & " /c " & "notepad U:\Windows 2003\Tools\Replication AD\RepAD_Result.txt","",@SW_HIDE)

FileDelete("" & @ScriptDir & "\RepAD_Result_temp.txt")

Func WriteLog()

$file = FileOpen("" & @ScriptDir & "\RepAD_Result_temp.txt", 0)

; Check if file opened for reading OK

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")

Exit

EndIf

While 1

$line = FileReadLine($file)

If @error = -1 Then ExitLoop

FileWrite("" & @ScriptDir & "\RepAD_Result.txt",$line & @CRLF)

Wend

FileClose($file)

EndFunc

RepAD_OK.txt

RepAD_Error.txt

Posted

Does it work fine on a 32-bits system?

Did you try adding #AutoIt3Wrapper_UseX64=Y to the top of the script before compiling?

:graduated:

Hey cool i had the line like you said and everything work fine

But do i need to put this line on all my script to use them correctly on 64 bits system ?

Thanks !

Posted

Yes, if you want to compile for 64-bit systems.

:graduated:

OK Thanks for the info...first time i have a 64 bits system...

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
  • Recently Browsing   0 members

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