ksmith247 Posted April 24, 2007 Posted April 24, 2007 I have written a small script that will (among other things) launch IE as local system (using Psexec) on remote machines. This keeps me from having to use Runas on the end users device or type in the path to the exe using cmd line Psexec. I would like to move away from relying on Psexec to do these things. Is there some way I can move to straight AutoIt code for this type of thing? GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit ; Case $msg = $Button_3 $ReadInput = GUICtrlRead($Input_1) RunWait("psexec -s -i \\" & $ReadInput & ' "c:\program files\internet explorer\iexplore.exe"') ; Case $msg = $Button_4 $ReadInput = GUICtrlRead($Input_1) Run("psexec -s -i \\" & $ReadInput & " c:\windows\system32\cmd.exe") ; Case $msg = $Button_5 $ReadInput = GUICtrlRead($Input_1) Run("psexec -s -i \\" & $ReadInput & " c:\windows\regedit.exe") ; Case $msg = $Button_6 $ReadInput = GUICtrlRead($Input_1) Run("psexec -s -i \\" & $ReadInput & " c:\windows\servicepackfiles\i386\msconfig.exe") Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]
DaleHohm Posted April 24, 2007 Posted April 24, 2007 For IE you can use ObjCreate ( "classname" [, "servername" [,"username", ["password"]]] ) E.g. $oIE = ("InternetExplorer.Application", "remote-server", "username", "password") You can then even further control the $oIE instance using the IE Management UDF. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
ksmith247 Posted April 25, 2007 Author Posted April 25, 2007 Thanks for the reply. I will look into that. Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]
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