Riaan Posted December 20, 2008 Share Posted December 20, 2008 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 Link to comment Share on other sites More sharing options...
BrettF Posted December 20, 2008 Share Posted December 20, 2008 Post the script maybe? Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Riaan Posted December 21, 2008 Author Share Posted December 21, 2008 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 Link to comment Share on other sites More sharing options...
BrettF Posted December 21, 2008 Share Posted December 21, 2008 pscp.exe is it for 64 or 32 bit windows? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Riaan Posted December 21, 2008 Author Share Posted December 21, 2008 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 Link to comment Share on other sites More sharing options...
BigDod Posted December 21, 2008 Share Posted December 21, 2008 Please do not PM me asking for help. If I felt inclined to help I would answer here. 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 Link to comment Share on other sites More sharing options...
Riaan Posted December 21, 2008 Author Share Posted December 21, 2008 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 Link to comment Share on other sites More sharing options...
BrettF Posted December 21, 2008 Share Posted December 21, 2008 Blew your chances of my help by PM'ing someone. Good luck with your solution. Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now