|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am trying to get focus on the lsnrctl window so I can use the sendkeys to that exe. But even though I see the focus the sendkeys is not able to inject anything...
Does anyone know why..I tried Sleep... objShell.Run("D:\Infrastructure\10.1.2\bin\lsnrctl.exe CHANGE_PASSWORD"),1,True objShell.AppActivate("D:\Infrastructure\10.1.2\bin\lsnrctl.exe") objShell.SendKeys "{ENTER}" objShell.SendKeys "password" |
|
#2
|
||||||
|
||||||
|
Quote:
vb Code:
__________________
Click the image if at any point you don't like my decision.Scripting problems? Windows questions? Ask the Windows Guru! |
|
#3
|
|||
|
|||
|
Nilpo
I assumed it was in focus because I see the cmd window that I called the script from gray out and the title bar of D:\Infrastructure\10.1.2\bin\lsnrctl.exe come forward and appear blue. But using your code the result is the same. The lsnrctl command window waits for user input. I am very new to Windows Scripting I will attempt to add error checking...thanks |
|
#4
|
||||
|
||||
|
Ok. The best way to handle command windows is by passing text to the StdIn stream...I'll post back with the code.
![]() |
|
#5
|
|||||
|
|||||
|
I apologize. I didn't have time to write the code earlier. Here's what you need to use the StdIn and StdOut streams to read and write to a CMD window. Cheers!
vb Code:
|
|
#6
|
|||
|
|||
|
NO luck :(
Thanks for the code...I tried it this morning.....the code spawns the second window but it dissappears in a sec and isnt setting it...Im VERY new to windows scripting how can I slow it down to see errors?
Thanks again for your help |
|
#7
|
||||
|
||||
|
You should be able to just echo strError.
![]() |
|
#8
|
|||
|
|||
|
I added some ECHO commands...I added one right after te strCommand = "D..........CHANGE_PASSWORD"
that one I get back from screen ..then I added another one after the line below along with a strError=WshShellExec.stdErr.ReadALL Set WshShellExec=WshShell.Exec(strCommand) but i dont get the echo and at that point it waits for a few seconds and terminates...when I check to see if the change was made it was not...I should see my original listener.ora file with a new time stamp... I must be doing soemthing wrong.. |
|
#9
|
|||
|
|||
|
if the Exec command supresses the command window of the lsrnctl is there a way to allow it to come up so I can see if the stream in is actually writing?
|
|
#10
|
||||
|
||||
|
Quote:
|