Jump to content

JLanning

Members
  • Posts

    6
  • Joined

  • Last visited

JLanning's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. That did it... Is there any reasoning behind that? (Asking for a friend)
  2. I'm looking to run this with elevated privileges, there are items that aren't showing up for me when I run this from a compiled exe, compared to running it from a command prompt. Any help would be great!!. #include <AutoItConstants.au3> #RequireAdmin Func DiskCleanup($Drive = "C") ShellExecute("cleanmgr.exe", "/sageset:12","", "runas") EndFunc
  3. Thanks so much!!! I was working forever trying to get this done.
  4. I'm looking for a little help, I'm looking to update the variable $CPUPercent and then update the GUI with the new value. The problem is every time I call the function at the bottom of the while loop my GUI stops allowing inputs until the sleep timer is over. Is there any way to do what I'm trying to do? #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #Region Variables $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $ComName = @ComputerName $objServices = ObjGet("winmgmts:\\" & $ComName) Dim $CPUPercent #EndRegion Func _GetCPUPercent () Sleep (10000) $colItems = $objServices.ExecQuery("SELECT * FROM Win32_PerfFormattedData_PerfOS_Processor", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems If Not StringInStr($objItem.Name, "Total") = 0 Then ConsoleWrite ($objItem.PercentProcessorTime & $objItem.Name & @CRLF) $CPUPercent = $objItem.PercentProcessorTime EndIf Next Else MsgBox (48, "WMI Error", "WMI Error") EndIf EndFunc ;MsgBox (1, "data", $CPUPercent) $DashboardGUI = GUICreate ("Dashboard", 1000, 750) $CPUPercentLable = GUICtrlCreateLabel ($CPUPercent, 15, 15, 20, 20) $Exit = GUICtrlCreateButton("Exit", 500, 700) GUISetState(@SW_SHOW) Call("_GetCPUPercent") While 1 Switch GUIGetMsg() Case $gui_event_close Exit Case $Exit Exit EndSwitch Call("_GetCPUPercent") If GUICtrlRead ($CPUPercentLable) <> $CPUPercent Then GUICtrlSetData($CPUPercentLable, $CPUPercent) EndIf WEnd
  5. On the HP computer I have to change these settings on it has an Enhancements tab that isn't showing up for me.
  6. I'm working on a program to guide users through a change of a sound setting on their computers, the problem I'm having is if I open the sound properties with a compiled autoit EXE one of the tabs at the top of the properties window are missing. Run("control mmsys.cpl sounds") Run(@ComSpec & " /c " & 'control mmsys.cpl sounds',"", @SW_HIDE) RunAs("student", @ComputerName, "", $RUN_LOGON_NOPROFILE, "control mmsys.cpl sounds", "") ShellExecute("test.bat","","C:\Users\Student\temp") I've tried all these different options and none of them will open the properties the correct way. Any help would be awesome, thanks in advance.
×
×
  • Create New...