lonnieother 0 Posted August 22, 2011 Hello all, I have written a GUI to automate an install script that my team uses. We use PSexec in order to run MSIexec on a list of copmuters Psexec @computerlist.txt -u "Username" -p "Password" Msiexec /i "MyProgram.msi" /qn This works great because we can just gather the list of computers on the network in a list and then it installs them all for us. The problem comes because we have different installers for 64bit and 32bit computers. In the .Bat file we have, we used this command to determine what the processor type was. (This was through a loop in the batch script to \\%i is the same thing as @computerlist.txt Psexec \\%i -u "Username" -p "Password" cmd /c set | find "PROCESSOR_ARCHITECTURE" this was able to return amd64 or x86. Now i'm getting to the problem i'm running into with AutoIt. I cannot use WMIC on this, because that requires some services to be on that may or may not be running on the local machine. So i'm stuck with set. When i use PSexec with Autoit, I am having trouble retrieving the output of the child process so that I can do something with it. All I can do is helplessly watch it write to the screen and then disappear. Any help would be greatly appreciated. The current command that I am running is RunWait(@compsec & " /C " & 'Psexec @computerlist.txt -u "Username" -p "Password" cmd /c set | find "PROCESSOR_ARCHITECTURE" >> Processor.txt' Also, changing >> to 2> does not pull the information. If anyone knows an easier way to do that, i'm totally fine with that too. Share this post Link to post Share on other sites
water 2,420 Posted August 22, 2011 You could try to catch the result reading Stdout and/or Stderr. For an example please check "StdoutRead" in the help file. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2021-04-14 - Version 1.5.3.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2021-04-13 - Version 1.6.4.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (NEW 2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
lonnieother 0 Posted August 22, 2011 Ah, should have mentioned that. I cannot get this with Stderr. I suspect it is becuase the output that psexec generates is actually a child process that is returned from the remote computer and printed to the screen. Can you think of an easier way to determine if remote computers are 64 or 32 bit? Share this post Link to post Share on other sites
water 2,420 Posted August 22, 2011 Don't know if this helps. On my Windows 7 system I get "Systemtype: x64-based PC" if I run "systeminfo /fo list" My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2021-04-14 - Version 1.5.3.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2021-04-13 - Version 1.6.4.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (NEW 2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites