Marcuzzo18 Posted July 6, 2008 Share Posted July 6, 2008 (edited) Hi All, this is my very first Post. I hope that this could be usefull for some of you. I wrote this because at times I need to execute commands on the console on a computer where this is blocked. there are portable cmd tools available non of them seem to have access. Batch files on the other end work pretty fine, As I got tired of manually editting a batch file before execution, I decided to write my own console. cmd2.exe Edited July 29, 2008 by Marcuzzo18 [font="Century Gothic"]quisnam est quantum stultus , balatro vel balatro quisnam insistovolubilis in solum rideo risi risum----------------------------------------------------------------------------------------------------------------------------Portable Command Line Tool[/font] Link to comment Share on other sites More sharing options...
spudw2k Posted July 8, 2008 Share Posted July 8, 2008 (edited) I don't really have a use for it, but thought this may be useful to others. Here's a gui that does what this script does, but not as cool looking. muttley expandcollapse popup#NoTrayIcon Global $output = "" $xWin = @DesktopWidth * .5 $yWin = @DesktopHeight * .5 $gui = GUICreate("CMD Tool",$xWin,$yWin,-1,-1) $inputbox = GUICtrlCreateInput("VER",$xWin * .025,$yWin * .05,$xWin * .875,$yWin * .05) GUICtrlSetFont (-1,9, 400, 0, "Arial") $outputwin = GUICtrlCreateEdit("",$xWin * .025,$yWin * .15,$xWin * .95,$yWin * .8,2048+2097152) GUICtrlSetFont (-1,9, 400, 0, "Lucida Console") $btnGo = GUICtrlCreateButton("GO",$xWin * .925,$yWin * .05,$xWin * .05,$yWin * .05) GUICtrlSetState(-1,512) GUISetState() While 1 $msg = GUIGetMsg() If $msg = -3 Then ExitLoop If $msg = $btnGo Then $strCMD = GUICtrlRead($inputbox) $CMD = Run(@Comspec & " /c " & $strCMD,"",@SW_HIDE,6) While 1 $line = StdoutRead($CMD) If @error Then ExitLoop $output &= $line & @CRLF WEnd While 1 $line = StdErrRead($CMD) If @error Then ExitLoop $output &= $line & @CRLF WEnd ProcessClose($CMD) $output &= "---------------------------------------------------------------------------------------" & @CRLF & @CRLF GUICtrlSetData($inputbox,"") If StringInstr($output,"") Then GUICtrlSetData($outputwin,"") $output = "" EndIf GuiCtrlSetData($outputwin,$output) GUICtrlSetState($inputbox,256) GUICtrlSetState($btnGo,512) EndIf WEnd Exit Edited July 8, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF 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