Sign in to follow this  
Followers 0
Riaan

trouble running on windows server 2003 64 bit

8 posts in this topic

I have a script that runs perfectly on windows xp, but is having problems with Windows server 2003 64 bit with the same script. What it does it that i copies a file from Xubutu to a directory on Windows using PSCP. It needs to pass the Xubutu password in order to start the copy. Now, on XP it works fine, but on Windows Server 2003 64 bit, the script does not pass the password, if you enter it manually there and press enter, it works perfectly futher on. I have recompiled the script to run on 64bit, but even this does not seem to fix the problem. Any suggestions??


Riaan van AardeintGo.net Software Development House

Share this post


Link to post
Share on other sites



This is what my code looks like. In my opinion the error occurs after the ";Backup Latest" comment. Please could any assist on why the script does stop on when it has to send the password here :

; Backup Latest

Run(@ComSpec & " /c " & $PCSPDir & "pscp.exe glass@" & $ServerIP & ":/opt/gemstone/product/seaside/data/backups/extent0.tgz " & $BackupDirectory & ".")

WinWaitActive(@ComSpec)

Sleep(1500)

Send("glass{ENTER}")

WinWaitClose(@ComSpec)

FileMove("extent0.tgz", "extent" & $MyDate[1] & "-" & $MyDate[2] & "-" & $MyDate[3] & ".tgz")

CODE
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****

#AutoIt3Wrapper_UseX64=y

#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <Date.au3>

Dim $MyDate

Dim $MyTime

_DateTimeSplit(_NowCalc(),$MyDate,$MyTime)

$BackupDirectory = "f:\eSMS_databaseBackups\"

$ServerIP = "155.237.81.52"

$PCSPDir = "f:\pcsp\"

; Delete old Files

FileChangeDir($BackupDirectory)

DeleteOldFiles()

; Backup Latest

Run(@ComSpec & " /c " & $PCSPDir & "pscp.exe glass@" & $ServerIP & ":/opt/gemstone/product/seaside/data/backups/extent0.tgz " & $BackupDirectory & ".")

WinWaitActive(@ComSpec)

Sleep(1500)

Send("glass{ENTER}")

WinWaitClose(@ComSpec)

FileMove("extent0.tgz", "extent" & $MyDate[1] & "-" & $MyDate[2] & "-" & $MyDate[3] & ".tgz")

; Functions

Func FileTimeToStr($value)

$value = $value[0] & "/" & $value[1] & "/" & $value[2]

Return $value

EndFunc

Func DeleteOldFiles()

$search = FileFindFirstFile("*.*")

; Check if the search was successful

If $search <> -1 Then

While 1

$file = FileFindNextFile($search)

If @error Then ExitLoop

$fileTime = FileTimeToStr(FileGetTime($file))

If _DateDiff('D',$fileTime,_NowCalcDate()) > 14 Then

FileDelete($file)

EndIf

WEnd

; Close the search handle

FileClose($search)

EndIf

EndFunc


Riaan van AardeintGo.net Software Development House

Share this post


Link to post
Share on other sites

pscp.exe - I use it daily to just copy the extent0.dbf file from the Xubutu virutual machine to a directory on Windows. it works perfect on both 64bit and 32 bit windows. i dont know if you are firmiliar with PSCP. PSCP is a freeware SCP (Secure CoPy) program for the Windows command line processor. You can use this program instead of FTP for copying files. see.. it's like this, we use to do this on a daily basis (the backup procedure) but would like it to run automatically. I made a Windows scheduled task to run the AutoIt script, but I also notice that it doesn't run if the Windows screensaver is enabled.


Riaan van AardeintGo.net Software Development House

Share this post


Link to post
Share on other sites

Please do not PM me asking for help. If I felt inclined to help I would answer here.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Please do not PM me asking for help. If I felt inclined to help I would answer here.

BigDot, sorry about the PM, I just asked out of desperation... that's all!! Have a great day, and may you be blessed richly this Christmas and in 2009!!!


Riaan van AardeintGo.net Software Development House

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