Jump to content

Rokkitt

Members
  • Posts

    5
  • Joined

  • Last visited

Rokkitt's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi, Still learning Autoit so be gentle. Have some code that uses runaswait to deploy an executable, using message boxes and filewrites I have confirmed the runstring passed to the OS is correct - I can copy and paste it into the run command and it installs without a hitch. I have pushed this to several machines and some seem to install yet others are unable to execute the runstring it would seem - no logs at all to point to the issue. The user is a domain account and is a member of the local administrators. My code is below, can you see any issues with this? Dim $CPClient_RunString Dim $Splash $CP12_RunString = CHR(34) & "NetworkShareReplicated DataSoftDistInstall_CitrixClient_12CitrixOnlinePluginFull_12.3.exe" & CHR(34) & " DONOTSTARTCC=1 /silent SERVER_LOCATION=" & CHR(34) & "http://XenAppServices/Citrix/PNAgent/config.xml" & CHR(34) $SPLASH = "NetworkShareReplicated DataSoftDistInstall_CitrixClient_12Splash.bmp" SplashImageOn("", $SPLASH,370,170) RunAsWait("domain user with local admin","domain","password",1,$CP12_RunString) SplashOff()
  2. Your a legend, thanks Mikell....
  3. Hi, I am attempting to create a script that will query WMI for the "LastBootUpTime" of the local computer. It seems I am up against what I believe are Syntax errors, I have attempted to convert the code from VB Script but it does not help. Using snippets from the forum I have managed to get something together but there is no output no matter how I approach it. $objWMI = ObjGet("winmgmts:{impersonationLevel=impersonate}!" & @ComputerName & 'rootcimv2:Win32_OperatingSystem') MsgBox(0, "Boot Time", "Last Reboot " & $objWMI.LastBootUpTime) The converted code: $strComputer = "." $objWMIService = ObjGet("winmgmts:" & $strComputer & "rootCIMV2") $colItems = $objWMIService.ExecQuery( _ "SELECT * FROM Win32_OperatingSystem WHERE LastBootUpTime = 20130513124052.319668+600",,48) The format I am attempting to output is: yyyy/mm/dd/hh/mm/ss although if I can just get some output I am sure I can work it out. Can anyone point me to anything to assist, I am quite new to AUTOIT and a complete novice extracting info from WMI. Thanks Just a little less hair after today..
  4. Can you suggest a good forum to try?
  5. Hi, I need to convert the following Autoit script into VB, being a VBScript dummy can someone give me some tips/tricks on how to go about doing this. Dim $RptfileName Dim $Rptfile Dim $RptLine Dim $Servername if Number($CmdLine[0]) <> 1 Then ConsoleWrite ("-1") ; Return Test failed Exit EndIf $Servername = $CmdLine[1] $Servername = StringReplace($Servername,".epwh.ad","") ;does not work with a FQDN; So we remove epwh.ad $RptfileName = "C:\Batch\citrix\Logon\" & $Servername & ".txt" FileDelete($RptfileName) RunWait(@ComSpec & " /c " & '"psexec.exe \\xenapp-FARM -u EPWH\Scheduled -p UB55Hi4C -c C:\batch\citrix\tslogins.exe /query /Server:' & $Servername & ' >>' & $RptfileName & '"', "") $Rptfile = FileOpen($RptfileName, 0) ; Check if file opened for reading OK If $Rptfile = -1 Then ConsoleWrite ("-2") Exit EndIf $RptLine = FileReadLine($Rptfile,2) If StringInStr($RptLine,"ENABLED") Then ConsoleWrite ("0") ; Return All good Else ConsoleWrite ("1") ; Return Failure EndIf Thanks in advance Rokkitt
×
×
  • Create New...