Jump to content

Vofffka

Members
  • Posts

    11
  • Joined

  • Last visited

Vofffka's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Sorry for a spam( on my node for administrator was password the same as on the win2008 and all was ok. When i set password for an administrator of win2003, my code works and for win2003. In the function RegRead is impossible set user name and password for a remote box(
  2. Local $locate="\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" Local $parm="ProductName" Local $RegParm1=RegRead("\\"&$ip&$locate, $parm) in this case i got error code 3 (if unable to remote connect to the registry) but this issue exist only for win2003. -All firewalls are disabled -reading permissions on "winreg" and "CurrentVersion" for Local Service, Administrators, Users are enabled -Remote Registry Access service is enabled What's wrong? p.s. for win2008 it's work fine.
  3. Thank you very match, Jos. My code: $foo=Run(@ComSpec & " /k psexec.exe \\"&$ip&" -u "&$login&" -p "&$passwd&$organization, @ScriptDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $line While 1 $line = StderrRead($foo) If @error Then ExitLoop if $line Then MsgBox(0, "STDERR read:", $line) EndIf Wend It's really work:)
  4. $foo=ShellExecute("psexec.exe", "\\192.168.116.125 -u administrator -p abc123 -cf test.exe") Local $errcode=StdoutRead($foo) ;also checked with StdErrRead() MsgBox(0,"",$errcode) result is the same. Perhaps there is an easer way to realize this task. My scheme: 1. i have control.script that reading parameters from a config file 2. after that the control.script uploading on the remote boxes other installation scripts and run them with parameters ShellExecute("psexec.exe", "\\192.168.116.125 -u administrator -p abc123 -cf test.exe firstparm secondparm etc") 3. this installation scripts do something and me need to get response from them - result of execution
  5. Tested, the same result From Help File for functions ShellExecute and ShellExecuteWait: Return Value Success: Returns the exit code of the program that was run. Failure: Returns 0 and sets @error to non-zero. Therefore both variants with ShellExecute and ShellExecuteWait will not return my error codes, i don't know how do it(
  6. Psexec return my error codes, but not shellExecute: exemple: Script remo.exe: Exit 12345 if i run it through cmd: c:\>psexec.exe \\192.168.116.125 -u administrator -p abc123 -cf test.exe PsExec v1.94 - Execute processes remotely Copyright © 2001-2008 Mark Russinovich Sysinternals - www.sysinternals.com test.exe exited on 192.168.116.125 with error code 12345. --->>here is my error code (12345) How i can get this error code send this command through ShellExecute? ShellExecute("psexec.exe", "\\192.168.116.125 -u administrator -p abc123 -cf test.exe") ******* My attempt: In This case i got empty message $foo=ShellExecute("psexec.exe", "\\192.168.116.125 -u administrator -p abc123 -cf test.exe") Local $errcode=StdoutRead($foo) MsgBox(0,"",$errcode)
  7. my solution of this issue: 1. compile 2 installers (x32&x64) add below string in the code: if node x64 then <through psexec copy and run x64 installer> else <through psexec copy and run x32 installer> endif
  8. Hi, all. How can i run my compiled script with parameters, how to declare this variables in the script body? For example: i need to download program, that versions are changed, and also i have different licenses numbers, that i need to send in the my script.exe file as parameters: something like this: my_script.exe -d http://download.site/program.exe -l another-license-key
  9. my Solution: $Conf_File=_Config_Open(@ScriptDir&"\config.xml") $enab=_Config_Read($Conf_File, "win","w") was found during writing this post:)
  10. Hello eltorro, thank you for your script. Have an one question: how i can open my .xml config file that generated by me in the notepad:) and read parameters #include <_ConfigIO.au3> $Conf_File=_Config_Indent(@ScriptDir&"\config.xml") $enab=_Config_Read($Conf_File, "win","w") If not @error Then MsgBox(0,"goga", $enab) EndIf in this case absence any messages, but my .xml file contains: <?xml version="1.0" encoding="UTF-16" standalone="yes"?> <CONFIG> <win> <w>1fgh</w> </win> </CONFIG> >Exit code: 0 What's wrong?
×
×
  • Create New...