Jump to content

Read data


lexus
 Share

Recommended Posts

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

  • Replies 44
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...