lexus Posted January 20, 2016 Author Share Posted January 20, 2016 but now I understand it I now wanted to do what you've done with the first comand pstools\pskill RunWait("c:\windows\pstools\pskill \\" & $aComputer[$i - 1][0] & " -u user -p password " & $aComputer[$i - 1][2] & " -accepteula") so i make ..... the second comand pstools\psexec.exe Sleep(5000) RunWait('c:\windows\pstools\psexec.exe \\' & $aComputer[$i - 1][0] & ' -u user -p password -i 1 -high "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\ "& $aComputer[$i - 1][3] &""') ExitLoop and here the variable and array Global $aInput[6], $aStop_Start[6], $aReboot[6] ; 2D array whereas 1st entry is the hostname, 2nd entry is for the status and 3rd for the process to monitor Global $aComputer[5][4] = [["computer1", "", "excel.exe", "start_exel_file.bat"], _ ["computer2", "", "powerpnt.exe", "start_room1_preentation.bat"], _ ["computer3", "", "powerpnt.exe", "start_room2_preentation.bat"], _ ["computer4", "", "powerpnt.exe", "start_room3_preentation.bat"], _ ["computer5", "", "iexplore.exe", "start_room4_internet.bat"]] I think wrong ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 20, 2016 Moderators Share Posted January 20, 2016 lexus, Again you were very close - you need to be more rigorous with your quotes: Sleep(5000) RunWait('c:\windows\pstools\psexec.exe \\' & $aComputer[$i - 1][0] & ' -u user -p password -i 1 -high "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\' & $aComputer[$i - 1][3] & '"') ExitLoop should do the trick. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
lexus Posted January 20, 2016 Author Share Posted January 20, 2016 i think it is too much quotes in this code :-( I've also tried this Global $aComputer[5][4] = [["retde147-ws0069", "", "powerpnt.exe", "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\Eingang.bat"], _ ["computer2", "", "powerpnt.exe", "start_room1_preentation.bat"], _ ["computer3", "", "powerpnt.exe", "start_room2_preentation.bat"], _ ["computer4", "", "powerpnt.exe", "start_room3_preentation.bat"], _ ["computer5", "", "iexplore.exe", "start_room4_internet.bat"]] and ;Sleep(5000) RunWait('c:\windows\pstools\psexec.exe \\" & $aComputer[$i - 1][0] & " -u user -p password -i 1 -high "" & $aComputer[$i - 1][3] & ""') ExitLoop is possible the file in folder to open without file name. only .bat or C:\folder\ *.* ? cmd command is @for %%f in ("C:\file\*.*") do start "" "%%f" ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 20, 2016 Moderators Share Posted January 20, 2016 lexus, If you want to use long complex psexec commands in AutoIt then you need to learn how to use them. To make the new code work you probably need: ;Sleep(5000) RunWait('c:\windows\pstools\psexec.exe \\" & $aComputer[$i - 1][0] & " -u user -p password -i 1 -high "' & $aComputer[$i - 1][3] & '"') ExitLoop which matches the quotes. And now I am out of this thread - good luck with the rest of your project. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
lexus Posted January 20, 2016 Author Share Posted January 20, 2016 Thank you :-) 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