eliteapu Posted October 20, 2007 Share Posted October 20, 2007 Hello guys, I have been working on a small project here for a while, and am just getting stumped at this inetget crap! Any help is appreciated...heres a snippet... #Include <Inet.au3> InetGet("http://www.hacking4life.com/ventrilo-2.3.0-Windows-i386.exe", "C:\ventrilo.exe") sleep(60000) ;msgbox(1, "DOWNLOADED", "File Downloaded.") ShellExecute("ventrilo.exe", "/q", "C:\") sleep(60000) ;msgbox(1, "INSTALLED", "File Installed.") InetGet("http://www.hacking4life.com/vent/ventrilo2.ini", @AppDataDir&"\Ventrilo\ventrilo2.ini") sleep(30000) ;msgbox(1, "CFG'S", "Configs in place.") ShellExecute("ventrilo://www.ventrilo.hacking4life.com:27382/servername=H4L") ;sgbox(1, "Started", "Ventrilo Started.") My problems are vaste..but heres a brief description of what goes wrong.. 1) The script will download the ventrilo exe fine 2) Sometimes it finds it [and runs it silently] sometimes it doesnt 3) I get a error message todo with some dll..after a quick search I attempted a fix, not sure if it worked Any help is appreciated Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 20, 2007 Share Posted October 20, 2007 Hello guys, I have been working on a small project here for a while, and am just getting stumped at this inetget crap! Any help is appreciated...heres a snippet... My problems are vaste..but heres a brief description of what goes wrong.. 1) The script will download the ventrilo exe fine 2) Sometimes it finds it [and runs it silently] sometimes it doesnt 3) I get a error message todo with some dll..after a quick search I attempted a fix, not sure if it worked Any help is appreciated Ventrilo is a VoIP client, but you are obviously not getting it from www.ventrilo.com. There is zero chance I'm going to run this on my machine. So, what is it you need, exactly? One thing that might help you would be to dump the Sleep() functions and instead monitor the status of the background download with a loop checking the @InetGetActive macro. The example in the help file under InetGet shows how to do this. Another thing is that I don't see how the Windows shell (called by ShellExecute) is going to know what to do with the "ventrilo://" protocol when all you did was download it, not running anything to install the required registry keys. Another possibility is you are overwriting the legitimate Ventrilo VoIP client with... what? And counting on the install of the original to provide the shell execution keys. Seems... suspicious. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
eliteapu Posted October 20, 2007 Author Share Posted October 20, 2007 Actually 'sir', you are wrong on a few levels. I am not downloading from the ventrilo site, because I couldn't seem to grab the direct download, PLUS I KNOW, that MY site, will not go down.. :-D Also, I am installing, thats this ShellExecute("ventrilo.exe", "/q", "C:\") therefore the protocall ventrilo:// would be understood at the point of runtime :-D Is there anything that you can help me with? Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 20, 2007 Share Posted October 20, 2007 Actually 'sir', you are wrong on a few levels. I am not downloading from the ventrilo site, because I couldn't seem to grab the direct download, PLUS I KNOW, that MY site, will not go down.. :-D Also, I am installing, thats this ShellExecute("ventrilo.exe", "/q", "C:\") therefore the protocall ventrilo:// would be understood at the point of runtime :-D Is there anything that you can help me with? Sir? Ooh, now I feel all OLD 'n stuff... True enough that I missed the install line. Mind you, I'm a fan of White-Hat hacking (as distinguished from cracking/Black-Hat stuff). So, an MD5 or SHA1 hash of the file from ventrilo.com and the one from hacking4life.com will be the same, and will include and comply with the terms of LICENSE.TXT from Venrtilo? Hmmm...? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
eliteapu Posted October 20, 2007 Author Share Posted October 20, 2007 (edited) Will be the same, and it is exaclty what you download from ventrilo.com..check if you like, i seriously just couldn't pull the direct download link but, can you actually help me with the code EDIT: if you want to know the reason for this scripts its that I have a bunch of pc's that I need to get vent onto, and i would HATE to sit through the install, so i found the silent switch "/q" and now i made this to download and auto install..just having a bit of trouble Edited October 20, 2007 by eliteapu Link to comment Share on other sites More sharing options...
Paulie Posted October 20, 2007 Share Posted October 20, 2007 (edited) 2) Sometimes it finds it [and runs it silently] sometimes it doesnt 3) I get a error message todo with some dll..after a quick search I attempted a fix, not sure if it worked I would bet #2 would be that because you aren't actually checking the download, it may not be fully downloaded when you try to run it. Try this #Include <Inet.au3> InetGet("http://www.hacking4life.com/ventrilo-2.3.0-Windows-i386.exe", "C:\ventrilo.exe") ProgressOn ( "Downloading", "Downloading Ventrilo..." ,"0%", -1,-1, 1) $Size = InetGetSize("http://www.hacking4life.com/ventrilo-2.3.0-Windows-i386.exe") While @InetGetActive ProgressSet ( Round(@InetGetBytesRead/$Size,1)*100, Round(@InetGetBytesRead/$Size,1)*100&"%") WEnd Progressoff() msgbox(1, "DOWNLOADED", "File Downloaded.") ShellExecute("ventrilo.exe", "/q", "C:\") ;...rest of script Edited October 20, 2007 by Paulie Link to comment Share on other sites More sharing options...
eliteapu Posted October 20, 2007 Author Share Posted October 20, 2007 Right, that seems to have fixed it, but that takes away the 'invisible' part of it...oh well Now for the ini part....I have got the script to successfully download and install vent, then it SHOULD download the ini file, and place it in the appropriate folder...the ini file provides a name so that we dont have to have our users create a user name.. that part isnt working..any body see any problems? Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 20, 2007 Share Posted October 20, 2007 Right, that seems to have fixed it, but that takes away the 'invisible' part of it...oh well Now for the ini part....I have got the script to successfully download and install vent, then it SHOULD download the ini file, and place it in the appropriate folder...the ini file provides a name so that we dont have to have our users create a user name..that part isnt working..any body see any problems?Same problem? Is the transfer of the .ini complete before you go on? What fails on it? Are you using the option for background transfer? Did you see that only one transfer can be going at a time, if the second starts before the first is finished it will fail (see help file -- again).Post your current transfer code and the wait loop (if any). Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
eliteapu Posted October 20, 2007 Author Share Posted October 20, 2007 #Include <Inet.au3> InetGet("http://www.hacking4life.com/ventrilo-2.3.0-Windows-i386.exe", "C:\ventrilo.exe") ProgressOn ( ".", "LULZ" ,"0%", -1,-1, 1) $Size = InetGetSize("http://www.hacking4life.com/ventrilo-2.3.0-Windows-i386.exe") While @InetGetActive ProgressSet ( Round(@InetGetBytesRead/$Size,1)*100, Round(@InetGetBytesRead/$Size,1)*100&"%") WEnd Progressoff() ShellExecute("ventrilo.exe", "/q", "C:\") sleep(60000) InetGet("http://hacking4life.com/vent/ventrilo2.ini", @UserName\@AppDataDir&"\Ventrilo\ventrilo2.ini") ProgressOn ( ".", "LULZ" ,"0%", -1,-1, 1) $Size = InetGetSize("http://hacking4life.com/vent/ventrilo2.ini") While @InetGetActive ProgressSet ( Round(@InetGetBytesRead/$Size,1)*100, Round(@InetGetBytesRead/$Size,1)*100&"%") WEnd ShellExecute("ventrilo://www.ventrilo.hacking4life.com:27382/servername=H4L") Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 20, 2007 Share Posted October 20, 2007 The format of @UserName\@AppDataDir is wrong. The macro @AppDataDir is already the full path for the current user. InetGetSize() doesn't always get a number, so I put in an alternative to use a SplashTextOn box vice progress bar. I won't test it, but at least it compiles clean: expandcollapse popup#Include <Inet.au3> ; Start download of installer (may or may not get size first) $Size = InetGetSize("http://www.hacking4life.com/ventrilo-2.3.0-Windows-i386.exe") If $Size Then ; Use progress bar if file size was retrieved ProgressOn(".", "LULZ", "0% in 0.0 seconds", -1, -1, 1) Else ; ...else use a SplashTextOn message SplashTextOn(".", "LULZ" & @LF & @LF & "Downloading Ventrilo installer file... 0.0 seconds", 400, 200, -1, -1, 32 + 16 + 2) EndIf ; Monitor download of installer until done $Timer = TimerInit() InetGet("http://www.hacking4life.com/ventrilo-2.3.0-Windows-i386.exe", "C:\ventrilo.exe") While @InetGetActive $TimeTot = Round(TimerDiff($Timer) / 1000, 1) If $Size Then $PerCent = Round(@InetGetBytesRead / $Size, 1) * 100 ProgressSet($PerCent, $PerCent & "% in " & $TimeTot & " seconds") Else SplashTextOn(".", "LULZ" & @LF & @LF & "Downloading Ventrilo installer file... " & _ $TimeTot & " seconds", 400, 200, -1, -1, 32 + 16 + 2) EndIf Sleep(1000) WEnd ProgressOff() SplashOff() ; Install Ventrilo ShellExecute("ventrilo.exe", "/q", "C:\") ProcessWait("ventrilo.exe", 5) While ProcessExists("ventrilo.exe") Sleep(20) WEnd ; Start download of .ini file (may or may not get size first) $Size = InetGetSize("http://hacking4life.com/vent/ventrilo2.ini") If $Size Then ProgressOn(".", "LULZ", "0%", -1, -1, 1) Else SplashTextOn(".", "LULZ" & @LF & @LF & "Downloading Ventrilo config file... 0.0 seconds", 400, 200, -1, -1, 32 + 16 + 2) EndIf ; Monitor download of .ini file until done $Timer = TimerInit() InetGet("http://hacking4life.com/vent/ventrilo2.ini", @AppDataDir & "\Ventrilo\ventrilo2.ini") While @InetGetActive $TimeTot = Round(TimerDiff($Timer) / 1000, 1) If $Size Then $PerCent = Round(@InetGetBytesRead / $Size, 1) * 100 ProgressSet($PerCent, $PerCent & "% in " & $TimeTot & " seconds") Else SplashTextOn(".", "LULZ" & @LF & @LF & "Downloading Ventrilo config file... " & _ $TimeTot & " seconds", 400, 200, -1, -1, 32 + 16 + 2) EndIf WEnd ProgressOff() SplashOff() ; Attempt to use ventrilo protocol ShellExecute("ventrilo://www.ventrilo.hacking4life.com:27382/servername=H4L") The visible progress tracking should help to determine where things go wrong. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
eliteapu Posted October 20, 2007 Author Share Posted October 20, 2007 (edited) Thanks very much, I will test and report back mate! EDIT: works pretty well, a lot better than before! It seems as though the config file is not being placed in the directory, or its just not working for some reason...either way, easy fix....thanks again mate! Edited October 20, 2007 by eliteapu 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