frankpintosr Posted April 16, 2008 Share Posted April 16, 2008 Hey All,I am a total noob, sorry in advance. I found a VB script and am trying to convert it to Autoit. I will include the VB script, and what I have so far. Please take a look. Please try to make your answers as simple as possible, I am seriously new at this and trying to get the hang. I am running on Vista. It is not working yet, so what is wrong/missing? Thank you!!VB Script as PostedstrComputer = "localhost"If Not strComputer = "" ThenstrComputer = trim(strComputer)set objAltirisAgent = createobject ( "Altiris.AeXNSClient", strComputer )ignoreBlockouts = 1sendIfUnchanged = 1objAltirisAgent.SendBasicInventory sendIfUnchanged, ignoreBlockoutsEnd If[u][b]Converted to AutoIT (So Far)[/[/u]b] #RequireAdmin dim $computer $computer = "localhost" $objAltirisAgent = ObjCreate ("Altiris.AeXNSClient", $computer) With $objAltirisAgent .ignoreBlockouts = 1 .sendIfUnchanged = 1 EndWith Link to comment Share on other sites More sharing options...
MHz Posted April 16, 2008 Share Posted April 16, 2008 ignoreBlockouts and sendIfUnchanged seem to be variables. Try this #RequireAdmin $strComputer = "localhost" If $strComputer <> "" Then $strComputer = StringStripWS($strComputer, 3) $objAltirisAgent = ObjCreate ( "Altiris.AeXNSClient", $strComputer ) If Not @error Then $ignoreBlockouts = 1 $sendIfUnchanged = 1 $objAltirisAgent.SendBasicInventory ( $sendIfUnchanged, $ignoreBlockouts ) EndIf EndIf Link to comment Share on other sites More sharing options...
GEOSoft Posted April 16, 2008 Share Posted April 16, 2008 I think all you need there is #RequireAdmin Global $computer = "localhost", $ignoreBlockouts = 1, $sendIfUnchanged = 1 $objAltirisAgent = ObjCreate ("Altiris.AeXNSClient", $computer) $objAltirisAgent.SendBasicInventory ($sendIfUnchanged, $ignoreBlockouts) That's just going by the posted code. If you can provide a link to the page you found it on, there may be more information there. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
frankpintosr Posted April 16, 2008 Author Share Posted April 16, 2008 Thank you both, I was able to use both of them. I got it working right before my boss walked in and told me we don't need to add that piece. :-) 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