#1
|
|||
|
|||
Script working outside JDownloader but not as External
Hello, I have a Thomson TG784 and I'm trying to reconnect my internet through JDownloader.
I was able to find a script for it (.vbs), and it works just fine. When I double click it, it accesses "telnet", put the necessary info automatically and gives me a new IP. But if I add it as External in the reconnection option inside JDownloader and try to run, it doesn´t work. I got this message (cmd.exe window): Quote:
I would like someone here to help me make it work on JDownloader so that when it's necessary to restart my connection, the program can do it automatically. Last edited by psychic; 27.06.2011 at 13:24. |
#2
|
|||
|
|||
Do you understand the meaning of the fields in the External tab of the Reconnection settings?
The Command is for the command you use to launch your script. Specify the full path and the file name of your script. The Parameter field should contain all parameters for the command you specified for the Command field. You probably don't need any. If it still doesn't work after this explanation, please provide a screen shot of that External reconnection pane and the script you're using. Last edited by remi; 29.06.2011 at 12:34. Reason: typo |
#3
|
|||
|
|||
Yes, I know that, thanks. On the Command field I placed the path of my script and on the Parameter field I dind't place anything, because the script works by just opening it.
Ok, here is a shot when I try to run it with JDownloader: http://img18.imageshack.us/img18/4649/32566389.png And here is a shot when I open my script from its folder (the way it's supposted to work): http://img31.imageshack.us/img31/2298/84173603.png Script(this is the only way I can restart the connection with this router): Quote:
I really don't understand why the script doesn't work when JDownloader uses it... Last edited by psychic; 28.06.2011 at 19:17. |
#4
|
|||
|
|||
This is a bizarre problem knowing that the script works but not the telnet command. The script creates a shell and then sends some telnet commands to the router by simulating keyboard input. A pure script with some telnet commands should work and no VBS nor an additional shell would be necessary. Let's first try some other things.
If you type 'telnet' in a command window and Windoze doesn't recognise the command, then there might be a problem with the "PATH" system variable or telnet is not installed. It seems that telnet is not installed by default in Windoze Vista nor W7. Please read "Can't find Telnet in Vista?" ("**External links are only visible to Support Staff**). Did you already try to disable the option "Use special executer for windows"? |
#5
|
|||
|
|||
I found the script integrated with VBS, so that's what I tried in JDownloader, I don´t know how to use it without VBScript.
And when I need to restart the connection for a new IP I just have to open it, and it's done, so I thought I just had to add it on the external feature... Telnet is installed, because when I type "telnet 192.168.1.254" on cmd, it works, and I already tried some test command to see if it's working properly, and it is. Yes, I already tried to disable the option "Use special executer for windows" and the cmd window doesn't even show up. Maybe this "kind" of script is just not compatible to JDownloader... But I noticed that if I add a text file into the path field, JDownloader opens the file...so why does it open the .vbs script but it doesn't work? I also open the .vbs (with double click) and it starts rebooting the connection so... By the way, thanks for trying to help me. |
#6
|
|||
|
|||
What happens if you use the absolute path to your telnet.exe file in the VB script?
|
#7
|
|||
|
|||
I didn't quite understand.
I place my .vbs file with the script above inside, in the path. "C:\Users\......\Documents\JDownloader\restart.vbs" Inside that file is the script, and telnet should open but it doesn't... Is there anything special when we talk about ABSOLUTE path? Maybe I must place something different than: "C:\Users\......\Documents\JDownloader\restart.vbs" |
#8
|
|||
|
|||
You need to find the absolute path of your telnet executable file. Replace the telnet command in the .vbs file by the complete path.
Here the complete path is "C:\WINDOWS\system32\telnet.exe". |
#9
|
|||
|
|||
I did that, but now I have an error when JDownloader trys to open it.
But it works when I double click the script... It's something like this: Windows Script Host Script: C:\Users\..............\restart.vbs Line: 2 Char: 1 Error: The system unable to find specified file. Code: 80070002 Origin: (null) Maybe I have to change something: Quote:
Last edited by psychic; 02.07.2011 at 15:31. |
#10
|
|||
|
|||
Try replacing
Code:
oShell.SendKeys "telnet 192.168.1.254" Code:
oShell.SendKeys "C:\WINDOWS\system32\telnet.exe 192.168.1.254" |
#11
|
|||
|
|||
I did that and it works by opening it, but if I add it as external I have the same error as before:
Quote:
Since it's the only way I know for rebooting my router I'll just have to use it manually... |
Thread Tools | |
Display Modes | |
|
|