I have to execute below block of code in elevated previllage, as that particular wmic class will work only with admin previlage.
i am getting out put when i launch autoit as administrator, but i will not be able to launch autoit as admin in this particular case but my user have admin rights.
is there any better way i can run those command as administrator.?
tried below steps:
i have tried #RequireAdmin but that creates a user prompt Tried using Runas command but gives error as wrong username or password , stuck with that step.
traytip isn't working in windows 10. nothing happens when i use the Traytip command.
here's a simple script i used:
TrayTip("I'm a title", "I'm the message", 5) i tried changing the registry setting HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced ( which didn't have EnableBalloonTips) and creating a DWORD entry called EnableBalloonTips and setting it to 1 and logging off then back in. that did not resolve the problem.
i'm running Windows 10 v1709 b16299.431
Hi all to the forum guru and expert I am trying to automate this. in the registry I have the network profile name network 2 and network I want to change their CATEGORY to Private . Can someone lead me in the right direction.
Private is 1 and Public is 0
#RequireAdmin Global $sHKLMRoot = @OSArch = "x64" ? "HKLM64" : "HKLM" RegWrite($sHKLMRoot &"\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\NewNetworks" ,'/v NetworkList /t REG_MULTI_SZ /d 00000000 /f') see attached picture below
When I try to automate this install program I can not get any of the buttons to click with the "ControlClick" function or any mouse movement to move the mouse to the and click it. My OS is Windows 10 64Bit. I have tried both 32bit and 64bit installs of Autoit V3 to no avail.
I could not even get the run command to start the program until I used the variation of the command below in the script.
With the script below the install program starts but will not click the "Next" button no matter what I do.
Any help will be greatly appreciated.
Thanks in advance.
Opt("MouseCoordMode", 0) ;1=absolute, 0=relative to active window, 2=client
Run(@ComSpec & " /c " & 'C:\PhoenixPro_Install\RDXUtil\RDX_Tools_setup.exe', "C:\PhoenixPro_Install\RDXUtil", @SW_HIDE )
WinWait("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62")
WinActivate("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62")
ControlClick ("RDX Tools 1.62 - InstallShield Wizard", "Welcome to the InstallShield Wizard for RDX Tools 1.62", 1639, "left", 1) ;Next Button
I have written a small script to read a file from an FTP server and check its contents. This can be re-run by the press of a button, however, if the file is deleted from the ftp server between runs (with the .exe still live), the file is still "read" and written locally, which then passes the check.
If I run it initially without the file, it correctly fails and pops up my error message, but if the file is then added, it then seemingly gets cached (or similar) so that the app then always reports a success.
The below code snippet is just the function run when the "test" button is pressed. It includes a load of debug message boxes, and from that I think I've gathered a few (possibly) interesting/relevant things:
$Open and $Conn are 8 byte values, which increments (not by 1) when the FTP connection is not closed, but if the connection is closed, they stick at the value (presumably windows can re-use that session id if it's been closed e.g:
1st run (file not present) $Open -> 0x00CC0004 $Conn -> 0x00CC0008
2nd run (file not present) $Open -> 0x00CC0010 $Conn -> 0x00CC0014
3rd run (file now present) $Open -> 0x00CC001C $Conn -> 0x00CC0020
4th run (file still present) $Open -> 0x00CC001C $Conn -> 0x00CC0020
$Ftp = _FTP_FileGet.... returns a 1 when file not present (in a run after it was present) and "test_transfer.txt" does get created and does contain the correct string This is the key bit I dont understand, I dont know how/where it is getting the data to write this file when it literally no longer exists on the target FTP server...
resetting every variable used in the function each time it's run does work (in that they become 0), but it doesn't affect the putcome I had thought perhaps some key values were being stored in the variables, but this doesn't seem to be the case
Is there any concept of clearing a cache when closing an ftp session? Or deleting any unknown temporary files windows might make?
Func Transfer() Local $connected = 0 $Ftpp = 0 ;Trying to reset these every time function is called $file = 0 $Open = 0 $Conn = 0 $Ftpc = 0 ;Make a new "connecting..." window so that the user has feedback that a transfer is attempting to take place ;Otherwise it just runs in the background and there's no indication its doing anything $connection_window = GUICreate ("Ethernet Switch Test" , 300 , 160 , -1 , -1 , -1 , -1 , 0) GUISetBkColor(0xFFFFFF) GUISetFont(10 * _GDIPlus_GraphicsGetDPIRatio(), 400, Default, "Sans Serif") $connecting_label = GUICtrlCreateLabel("Connecting to board...", 0, 25, 300, -1, $SS_Center, "") GUISetState(@SW_SHOW, $connection_window) Sleep(100) ;Connect ;MsgBox(0, "DEBUG", "1" & $Conn) While $connected = 0 $Open = _FTP_Open($count) ;MsgBox(0, "DEBUG", "open " & $Open) $Conn = _FTP_Connect($Open, $server, $username, $password) ;MsgBox(0, "DEBUG", "2" & $Conn) If $Conn = 0 then Local $retry = Msgbox(65, 'FTP Transfer', 'Connection failed' & @CRLF & "Retry?") If $retry = 2 Then MsgBox(0, "FTP Transfer", "Operation aborted") GUISetState(@SW_HIDE, $connection_window) Return EndIf Else $connected_label = GUICtrlCreateLabel("Connected!", 0, 45, 300, -1, $SS_Center, "") $connected = 1 MsgBox(0, "DEBUG", "3" & $connected) Sleep(100) endIf WEnd $transfering_label = GUICtrlCreateLabel("Reading file....", 0, 45, 300, -1, $SS_Center, "") ;Read file from server ;MsgBox(0, "DEBUG", "5" & $Ftpp) ;MsgBox(0, "DEBUG", "flie " & $file) $Ftpp = _FTP_FileGet($Conn, 'test/test.txt', 'test_transfer.txt') ;MsgBox(0, "DEBUG", "6" & $Ftpp) If ($Ftpp) then $transfered_label = GUICtrlCreateLabel("Transfered, checking...", 0, 65, 300, -1, $SS_Center, "") ;MsgBox(0, "DEBUG", "flie " & $file) $file = FileRead("test_transfer.txt") ;MsgBox(0, "DEBUG", "flie " & $file) If Not StringInStr($file, 'this is a test string 12345') Then MsgBox(0, "File check", "Received file incorrect, test failed!") GUISetState(@SW_HIDE, $connection_window) Return Else $tested_label = GUICtrlCreateLabel("Tested and Passed!", 0, 85, 300, -1, $SS_Center, "") $Ftpc = _FTP_Close($Open) ;MsgBox(0, "DEBUG", "close" & $Ftpc) ;$count = $count+1 $ok_button = GUICtrlCreateButton("OK", 125, 105, 50, -1) While 1 Local $pressed = GUIGetMsg() If ($pressed = $ok_button) Then FileDelete("test_transfer.txt") GUISetState(@SW_HIDE, $connection_window) ;$connection_window = 0 Return EndIf WEnd EndIf Else MsgBox(0, "Transfer", "Could not read file " & @error) GUISetState(@SW_HIDE, $connection_window) Return EndIf EndFunc