Jump to content

Search the Community

Showing results for tags 'windows 10'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • Forum
  • AutoIt


  • Community Calendar

Found 63 results

  1. Hello Everyone, I seem to have run into an issue with Windows 10. When running (See Below) on windows 10 it prompt for user opens cmd as admin and does nothing. If I run the same code without (#RequireAdmin) everything works. I never had these issue with Windows 7 is there something I am missing. Thank you in advance! #RequireAdmin run ("cmd") WinWaitActive ("Administrator: C:\WINDOWS\SYSTEM32\CMD.exe") ControlSend ("Test") Send("{enter}")
  2. How do I work with 2D arrays. I've tried this but get errors. Local $aTest[4][4] = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]] ;$aTest[0][] = [10,11,12] ; Error at [] Local $sTest = "" For $i = 0 To UBound($aTest)-1 Local $aExtract = _ArrayExtract($aTest,$i,$i) $sTest = $sTest & MyTest($aExtract) Next Func MyTest($aTemp) _ArrayDisplay($aTemp) ; Error at v $aTemp Return String($aTemp[0]) & " - " & String($aTemp[1]) & " - " & String($aTemp[2]) & @CRLF EndFunc
  3. I'm trying to fill a ListView with all normal viewable windows to act with them. First I tried with WinList: Local $aWinList = WinList("[REGEXPTITLE:(?i)(.+)]") Local $aTmp, $iID ;~ _ArrayDisplay($aWinList) For $i = $aWinList[0][0] To 1 Step -1 ; going backwards not disturbing the index while cycling through and deleting some If StringStripWS( $aWinList[$i][0], 3) == "" Or _ Not BitAND(WinGetState($aWinList[$i][1]), $WIN_STATE_VISIBLE) Or _ BitAND(WinGetState($aWinList[$i][1]), $WIN_STATE_MINIMIZED ) Then _ArrayDelete($aWinList, $i) Else ; Window has a Title and is "visible" $aTmp = WinGetPos($aWinList[$i][1]) If $aTmp[0] < -1000 Or $aTmp[1] < -1000 Then ; Window is minimized or tray icon _ArrayDelete($aWinList, $i) EndIf EndIf Next $aWinList[0][0] = UBound($aWinList)-1 ; getting actual # of windows ; Each row is now [ID]=> [Title], [hWnd] But it keeps getting Windows which are definitely not there at least not visible: Those windows "Rechner", "Einstellungen", "Netflix", "Microsoft Store", ... are not there!?! It should list only the first three windows, which are real. I even tried it with _WinAPI_ UDF: $hWnd = _WinAPI_GetForegroundWindow() ; Add items _GUICtrlListView_BeginUpdate($idListview) If $hWnd <> 0 Then $iI = 0 Do If _WinAPI_IsWindow($hWnd) And _WinAPI_IsWindowVisible Then _GUICtrlListView_AddItem($idListview, WinGetTitle($hWnd)) _GUICtrlListView_AddSubItem($idListview, $iI, $hWnd, 1) $iI += 1 $hWnd = _WinAPI_GetWindow($hWnd, $GW_HWNDNEXT) EndIf Until $hWnd = 0 EndIf But it is the same... How can i distinguish those invisible windows from normal ones? PS: I'm using Windows 10, maybe it is important to know?
  4. Hello all ~ I am running an autoit script on Windows 10 inside VMware Workstation 12 Pro version 12.5.2. Technically I am remoting into ESXi which has a Domain Controller (DC), WebServer, FilServer, Windows 10, etc. Using the GUI (i.e. running explorer.exe) I am able to open several different folders successfully. The desktop, documents, USB external all open without issue. The network share opening gives me issues. Whenever I attempt to open \\filserver\users\user\sharedfolder I get the documents folder instead. I understand that the documents folder is the default for explorer. I have also attempted to use the letter drive mapped to the network share (Z:) and receive the same result. When I run this script on Windows 10 alone without the VM or the ESXi I am able to open the network share without problems. I have tried to use the net use command to designate a letter M: to the network share folder prior to running the script. This did not work for me. One additional avenue I think might work is to use the systreeview321 and _GUICtrlTreeView_FindItem to step through the tree looking for the network share. Once found, double click on it and see if that opens the shared network folder. I can click inside the VM with my mouse on the network share and it opens just fine. Not sure if running up against GUI issues, or permission issues, or what? Thanks in advance, Davida Crozier TestNetworkShare.au3 This script is a subset of a much larger program, but it illustrates what I am dealing with.
  5. Using sample code: #include <MsgBoxConstants.au3> ; Find a pure red pixel in the range 0,0-20,300 Local $aCoord = PixelSearch(0, 0, 20, 300, 0xFF0000) If Not @error Then MsgBox($MB_SYSTEMMODAL, "", "X and Y are: " & $aCoord[0] & "," & $aCoord[1]) Else MsgBox($MB_SYSTEMMODAL, "", "Pure Not Found") EndIf ; Find a pure red pixel or a red pixel within 10 shades variations of pure red $aCoord = PixelSearch(0, 0, 20, 300, 0xFF0000, 10) If Not @error Then MsgBox($MB_SYSTEMMODAL, "", "X and Y are: " & $aCoord[0] & "," & $aCoord[1]) Else MsgBox($MB_SYSTEMMODAL, "", "Variant Not Found") EndIf and the attached screenshot which has Pure Red (FF0000) in one icon in the area being searched. Would someone please check this out for me?
  6. Hello, first of all i searched in the forum but i didn't found any solution to my problem. I am using windows 10. I made a script that is supposed to change the title to the active window, resize it to the smallest size possible (should be around 800 x 600) and move to (0, 0). I can change the title but i fail to do the other 2 tasks. i use wingettitle [active] copied from the F1 help tool (and this works), i i put the title in a variable and than i use winsettitle ($variable, "one") (this works too) winmove ("one", 0, 0, 800, 600) (doesn't do anything) i also tried local $x = winget ( "one") msgbox (0, "", $x) (i get a completely white box so i suppose winget can't have any data about my window ??) any suggestion ?
  7. I have a script that autostart with Windows, and sometimes some of my code is skipped. My script takes long pauses, so it's not that the script "goes too fast". This is my script for now: TraySetIcon("C:\Portables\AutoIt\_\icon.ico") AutoItSetOption("WinTitleMatchMode", 2) Run("C:\Portables\Key Manager\keymanager.exe") WinActivate("ATNSOFT Key Manager v") WinWaitActive("ATNSOFT Key Manager v") WinMove("ATNSOFT Key Manager v", "", 650, 200, 600, 800) Sleep(500) $pos = MouseGetPos() MouseClick("left", 1220, 210, 1, 100) MouseMove($pos[0], $pos[1], 100) Run("C:\Portables\foobar2000\foobar2000.exe") $version = 298 For $i = 0 To 99 Step 1 $path = "C:\Users\spunit\AppData\Local\Discord\app-0.0." & $version + $i & "\Discord.exe" If FileExists($path) Then Run($path) ExitLoop EndIf Next Run("C:\Portables\Firefox\FirefoxPortable.exe") Sleep(10000) WinMove("- Mozilla Firefox", "", 205, 0, 1214, 1047) Sleep(100) MouseClick("left", 1300, 15, 1, 10) Sleep(100) MouseClick("left", 1130, 275, 1, 10) Sleep(100) MouseClick("left", 930, 105, 1, 10) Sleep(100) Send("#{m}") Sometimes it skips to click and move mouse right after Key Manager starts. Almost always it skips everything after the last run. This type of script were never an issue with Windows 7... Any thoughts?
  8. I can not do anything with any user in the "Local Users Group" I tried from my account but I could not change my password (ie set new password)! But I was able to activate the Administrator account and I logged into the Administrator account and still could not do anything with my account! But I can set the password and disable the Administrator account from my account or Administrator. Any ideas? (Ignore the click on the Sign-in option in the Change Accout settings.)
  9. When I want to test Example 1 of Function _IECreate (AutoIt Help File), I see that function _IECreate doesn't work in Windows 10. Syntax Check (Ctrl+F5) gives no errors. Example 1: ; Create a browser window and navigate to a website #include <IE.au3> Local $oIE = _IECreate("www.autoitscript.com") The error I receive with F5 (Tools, Go) in SciTE:
  10. Does AutoIT supported in Windows 10 OS (x64)? After installing AutoIT in x64 OS and recompiling code, I get a lot of error messages...
  11. The DriveGetDrive command returned all drives (option "ALL") for years now and my program could always rely on that function. Suddenly a drive letter that was created with the subst command does not appear in the list of drives anymore. And it clearly did, because I used to react to a certain subst command by reacting to new or revoked (subst /D) drive letters. Why is that? I think this a bug because there's no way left to list ALL drive letters anymore. And why should I use an API command for that when this was already built in for years?
  12. I'm making a program that has a combo control in a gui and back in win7 when the window was focused the scroll wheel could be used to scroll through it's contents, now i'm using win10 and i have to put the mouse on that control to scroll up and down. Since now the scroll wheel works depending on where the mouse is, is there a way to make it no matter where on the gui the pointer is? Also if the only way to do it is some complex hotkey functions will it work with pressing space to toggle a checkbox? If you need to see what i have so far let me know and i'll copy it here.
  13. Hello, In Windows 10 PowerShell, one can do this to change the metric for a NIC in Windows 10: Get-NetAdapter | Where-Object -FilterScript {$_.InterfaceAlias -Eq "Ethernet 2"} | Set-NetIPInterface -InterfaceMetric 2 I know I can script the above PowerShell line (and it works!), but I wanted to try something I hadn't done before after looking into jguinch's most excellent Network configuration UDF. I wanted to make use of the SetIPConnectionMetric method in the WMI classes. There is an example VBscript here but this is not for Windows 10. Using AutoIT would also give better control over capturing error return codes than with PowerShell. But I cannot get my script to work! The return from SetIPConnectionMetric() is 0, which would indicate success. Yet the change does not happen. I also tried WMI methods using .put_ but this fails. Anyone more experienced than I have ideas to make this work? #RequireAdmin _SetNicInterfaceMetric2("Ethernet 2", "2") Func _SetNicInterfaceMetric2($NIC_NAME, $METRIC) Local $s_setIndx = 0 $objWMIService = ObjGet("winmgmts:{impersonationLevel = impersonate}!\\" & "." & "\root\cimv2") $colNICItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionID = '" & $NIC_NAME & "'", "WQL") If IsObj($colNICItems) Then For $objItem In $colNICItems $s_nicIndex = $objItem.Index Next ConsoleWrite("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE Index = '" & $s_nicIndex & "'" & @CRLF) $colNAC = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE Index = '" & $s_nicIndex & "'", "WQL") If IsObj($colNAC) Then For $objNetCard In $colNAC If $METRIC <> $objNetCard.IPConnectionMetric Then ConsoleWrite("Metric was set to " & $objNetCard.IPConnectionMetric & ". Setting to " & $METRIC & "." & @CRLF) $s_isSet = $objNetCard.SetIPConnectionMetric($METRIC) ConsoleWrite("SetIPConnectionMetric Result = " & $s_isSet & @CRLF) Else ConsoleWrite("Metric is already set to " & $METRIC & @CRLF) EndIf Next EndIf EndIf EndFunc ;==>_SetNicInterfaceMetric2
  14. OK, this one is baffling me and my coworkers. I created an AutoIt script with Windows 10 1607 (or maybe 1511) that would do a RunWait "DisplaySwitch.exe /clone" to have both monitors display the same content. It worked without issue. Then I upgraded a couple of weeks ago to Windows 10 1703 (Creators Update). Now when I run the script, it executes everything before and after the RunWait command but the display properties never change. I used variables to capture the result of the RunWait command and the value of @error. RunWait returns 0, @error returns 1 (though I don't know what that means exactly). I started over with a two-line AutoIt script which attempts to run DisplaySwitch.exe and nothing happens. I modified the RunWait command to run C:\windows\system32\DisplaySwitch.exe but nothing happens. So, I created a batch file which just attempts to run C:\windows\system32\DisplaySwitch.exe followed by a pause statement so I could read the results. It reports "'C:\WINDOWS\System32\DisplaySwitch.exe' is not recognized as an internal or external command, operable program or batch file.". So I modified the batch file to perform a directory listing of C:\Windows\system32\*.exe . It generates a list of 337 files, but if you look through the list, DisplaySwitch.exe is missing. I then modified the batch file to perform a recursive search for DisplaySwitch.exe from the root of C:\ and it eventually finds this single file: C:\Windows\WinSxS\amd64_microsoft-windows-displayswitch_31bf3856ad364e35_10.0.15063.0_none_fdd58a325d4a2de2\displayswitch.exe I can run that file from the batch file and it works fine. If I run the batch file directly rather than through an AutoIt script, it works fine and it lists DisplaySwitch.exe in C:\Windows\system32 . I have compiled the AutoIt script using v3.3.14.2 and in desperation, I even compiled it with autoit-v3.3.15.0-beta-setup.exe with the same results. I also tried adding #RequireAdmin with the same results. If I look at the security properties of the file I cannot find anything which implies that a script could not access it. I also notice that if I open a command prompt and do the same directory listing of all .exe files in C:\windows\system32 it lists 660 files, compared to only 337 files when that command is run through my AutoIt script. I can also report that when I made these two files available for download through Google Drive to my colleague running Windows 10 1511, Smart Filter and Symantec both complained about the files, but we bypassed the warning and they executed properly (i.e. DisplaySwitch.exe was visible in C:\windows\system32 and it switched to Clone Mode). My other colleague with 1703 has the same problem as me where DisplaySwitch.exe is invisible to scripts running from within an AutoIt script. switch.au3 switch.cmd
  15. Greetings all, I have an app that runs fine in windows 7 but not windows 10. issue : when entering the filename to save, it enters it into the saveAs dialog box, but Office still tries to save as "Diagram1" or "Presentation1" $FileError = "" MonitorProcess2("VISIO") _DebugOut("Visio Done") MonitorProcess2("POWERPNT") _debugOut("Powerpoint Done") CloseSave($FileSavePathName, $SaveAsWindow) _DebugOut("Saved and closed Powerpoint") _VSO_DocumentSave($objVisioFile) while not _VSO_DocumentSaved($objVisioFile) WEnd _VSO_VisioClose($objVisioFile) _DebugOut("Saved and closed Visio") else _DebugOut("Filename Does not exist = "& $FilePathName) EndIf the monitor process2 just makes sure the processes are complete before trying to save the files. The closeSave function is below, but since I am opening the file with the proper name, this is not an issue func CloseSave($SaveFile, $SaveAsWindow) _DebugOut("Save File ") _DebugOut($SaveFile) send("!{F4}") send ("!S") $title = WinGetTitle("[ACTIVE]") _DebugOut("WINDOW - current window is Powerpoint to enter filename " & $title) while not ($title = $SaveAsWindow) $title = WinGetTitle("[ACTIVE]") wend ControlSetText ($SaveAsWindow,"","[CLASS:Edit; INSTANCE:1]",$SaveFile) send ("!S") $title = WinGetTitle("[ACTIVE]") while not StringInStr($title,"Visio") $title = WinGetTitle("[ACTIVE]") wend EndFunc
  16. Hello, I've experience using automation anywhere. Now I want to learn Auto It for my automatization projects. I've tried to implement an example using calculator program in Windows 10. When I used au3Info program to identify an escefific zone in the calc window , au3info always return the same advanced class [CLASS:ApplicationFrameInputSinkWindow; INSTANCE:1] Is there a restriction for windows 10? See my little script Run("Calc.exe") WinWaitActive("Calculadora") WinActive("Calculadora") $old="0" $new="1020" $controlNumber="[CLASS:ApplicationFrameInputSinkWindow; INSTANCE:1]" ControlSetText("Calculadora","",$controlNumber,$new) ControlSend("Calculadora","",$controlNumber,$new) I've tried using controlSetText and ControlSend. Thank you for your help
  17. I have a working script that changes the core affinity and process priority of multiples of a specific application I have running. I have that part figured out. I would like to make a little modification to it. Windows10 introduced virtual desktops. I am trying to have different core affinity and priority of processes on the visible and non-visible desktops. What I need is a bool function that could be described as IsWindowOnCurrentDesktop($hWnd). I have searched the winAPI.au3 but I do not believe anything like that exists built it. I have searched multiple places before asking for help. I found a Microsoft supplied example of the function I need using C#, but I am unfamiliar with C# to a degree that I cannot port the system call over. https://blogs.msdn.microsoft.com/winsdk/2015/09/10/virtual-desktop-switching-in-windows-10/ Help is appreciated but not expected. Thanks in advanced. In the meantime I will be learning C# syntax and class structure.
  18. Does anybody know how I would go about getting the window title bar colour on Windows 10? I tried using _WinAPI_GetSysColor, and manually reading the registry (HKCU\Control Panel\Colors, ActiveTitle) but in either case I get the same (0x99B4D1, wrong) result. RegRead('HKCU\Control Panel\Colors', 'ActiveTitle') ; Returns 153 180 209 (aka 99B4D1) _WinAPI_GetSysColor ($COLOR_ACTIVECAPTION) ; Returns 0xD1B499 (aka 99B4D1)
  19. As the title says, does anyone know of a way to open the Windows 10 action center using AutoIt. Maybe via rundll or some other applet? My intention is to just hide the normal icon, then have an AutoIt system tray icon that will open the action center on click. And I can't just send the Win+A hotkey because I have it disabled. Thanks for reading.
  20. Hi folks, I'm hoping someone can help me out here. Background: I have the need to run a program with admin credentials (#RequireAdmin), and then get the SID of the locally logged in account. Not the admin account. If you look at the attached script, Line 16 uses the @UserName variable and returns the SID for the admin account I used to launch the app. I want to use line 17 which passes the result of the _GetUsername function which is a username using ($UserName) to the WMIService. I'm getting " The requested action with this object has failed.:" error message. Any suggestions would be appreciated! test1.au3
  21. I’m wondering how to add a Windows Hello option to the additional PIN, Fingerprint, and Facial Recognition options? I'd like an interface that could be linked to the Windows Hello authentication system and AutoIt itself. I understand that this discussion did not meet the Forum Rules, I apologize about that. I'd like to point out that this post is asking for a way to attach into the Windows Hello service. I'd like to follow the same concept that YubiKey's interact with Windows Hello as seen here: https://www.yubico.com/2016/09/yubikey-works-windows-hello/.
  22. Hello all! I am having a bit of trouble and was wondering if anyone may have a workaround for my issue. I made a script that would automatically install a piece of software each night on a Windows 7 Box. Now I have been instructed to do the same with a Windows 10 box since the application is now being tested on Windows 10. The way I did the win7 installation was that I made a script and then made an executable that I call with a batch file along with the Installer. So the process is AutoitMainFile calls batch file, batch file opens Installer, and the automatedinstaller.exe The automatedinstlaller waits 10-20 seconds to make sure the Installer has been fully loaded. When I try to do the same both get loaded but the automatedinstallation.exe does not send commands to the installer. The code does work and nothing from the program we are wanting to install has changed as our Windows 7 runs every night no problem. Do I need to make a new automatedinstall script for windows 10? Any advice is appreciated Thanks, Richard
  23. One of my GUI applications requires that a particular third-party application not only be running, but be present in the "sys tray" (aka Taskbar). When this 3p app is active but not in the systray/taskbar, it is not ready for proper use, and I must inform the user about this. Here is a code snippet that used to work fine under Windows 7: ; ; #FUNCTION# ========================================================================================================= ; Name...........: _Get_Systray_BtnIndex ; Description ...: Determines if an appllication with the specified title is running in the Systen Tray ; and if so, returns the relative index number of it's button on the tray. ; Syntax.........: _Get_Systray_BtnIndex($iTitleText) ; Parameters ....: $iTitleText -> The (tool-tip) title of the desired application ; Return values .: Success - Returns the index number of the desired appliction button, 1 being the first ; Failure - Returns 0 if desired application is not found in the System Tray ; Sets @error as follows: ; 0: Normal return ; -1: System Tray was empty (i.e., no appllications running the tray) ; -2: No System Tray was found ; Remarks .......; Setting any parameter to -1 leaves the current value unchanged ; Setting the $iStyle parameter to 'Default' resets ALL parameters to default values <<<<<<<<<<<<<<<<<<<<<<< ; Setting any other parameter to "Default" only resets that parameter ; Author ........: Poster "war59312", and code was found at URL: ; http://www.autoitscript.com/forum/topic/40550-check-if-program-is-running-under-system-tray/#entry902746 ; Modified by mjb on 26-June-2014 to return @extended error code rather than using MsgBox() to report errors. ; Func _Get_Systray_BtnIndex($sToolTipTitle) ; Find systray handle Local $hSysTray_Handle = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]') If @error Then Return SetError( -2, 0, 0 ) EndIf ; Get systray item count Local $iSystray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) If $iSystray_ButCount = 0 Then Return SetError( -1, 0 , 0 ) EndIf ; Look for wanted tooltip For $iSystray_ButtonNumber = 0 To $iSystray_ButCount - 1 If StringInStr(_GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber), $sToolTipTitle) > 0 Then ExitLoop Next If $iSystray_ButtonNumber = $iSystray_ButCount Then Return 0 ; Desired application is NOT running in the System Tray Else Return $iSystray_ButtonNumber ; Application was found in the SysTray EndIf EndFunc ;==> _Get_Systray_BtnIndex ; But what's happening under Windows 10 is that the "_GUICtrlToolbar_ButtonCount()" always returns 1, even though there are 10-14 items visible in the Task Bar. Unsurprisingly, the single item returned has nothing to do with the 3'rd party application in question. As you probably know, Microsoft made significant changes to the systray/taskbar since Windows 7 (or at least by Windows 10). I spent quite a while searching MSDN for some other way to accomplish what I need, but I must be too stupid to figure it out. Please help. Thanks!
  24. Hello, I have a problem, I cant run script as administrator in Windows 10: main.exe: RegWrite('HKLM\SOFTWARE\Policies\Microsoft\Windows\BITS', 'EnableBITSMaxBandwidth','REG_DWORD',Number('1')) RegWrite('HKLM\SOFTWARE\Policies\Microsoft\Windows\BITS', 'MaxTransferRateOnSchedule','REG_DWORD',Number('100')) RegWrite('HKLM\SOFTWARE\Policies\Microsoft\Windows\BITS', 'MaxBandwidthValidFrom','REG_DWORD',Number('7')) RegWrite('HKLM\SOFTWARE\Policies\Microsoft\Windows\BITS', 'MaxBandwidthValidTo','REG_DWORD',Number('22')) RegWrite('HKLM\SOFTWARE\Policies\Microsoft\Windows\BITS', 'UseSystemMaximum','REG_DWORD',Number('1')) RegWrite('HKLM\SOFTWARE\Policies\Microsoft\Windows\BITS', 'MaxTransferRateOffSchedule','REG_DWORD',Number('400')) run.exe: Global $sUserName = "administrator" Global $sPassword = "pass" Global $sDomain = "domain" RunAsWait($sUserName, $sDomain, $sPassword, 2, "main.exe", "", @TempDir) If I run "run.exe" it dont work... If I change main.exe to this: msgbox(1,"",@username) and it runs and shows administrator in message box... but it cant elevate main.exe with RegWrite() command... I tried using #RequireAdmin in first line of main.exe, but it not worked... UAC is set to "do not notify" This method of elevation worked on Windows 7 and Windows XP... Please help!
  25. I am having an issue with windows 10 and regwrite. when i run my script it acts as though it has updated the registry but when i view the registry it has not updated the keys. I added error checking to the script but it is not showing errors. now if i remove #requireadmin i will get error 1 - unable to open requested key. her is my code. #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #include <Process.au3> ; Declared Variables Global $userName = "user" Global $userPassword = "Ktesting" Global $autologin = "1" Global $notification = "0" Global $balloon = "0" If @OSArch = "X64" Then Global $HKLM = "HKLM64" Else Global $HKLM = "HKLM" EndIf ; Looks for switch on program start If $CmdLine[0] > 0 Then ; looks for switch on startup If $CmdLine[1] = "/boot" Then BootMachine() Else MachineInstallation() EndIf ; Setup Kiosk for first time Func MachineInstallation() #RequireAdmin MsgBox (1, "Installation", "Starting Install") ; Add Program to Run registry Key RegWrite ($HKLM & "\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "DL Kiosk", "REG_SZ", "c:\temp\DL Testing Kiosk\dl testing kiosk.exe /boot") If @error Then MsgBox (1, "error", @error) EndIf ; Add Automatic Logon Registry Key RegWrite ($HKLM & "\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon", "AutoAdminLogon", "REG_SZ", $autologin) If @error Then MsgBox (1, "error", @error) EndIf RegWrite ($HKLM & "\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon", "DefaultUserName", "REG_SZ", $userName) If @error Then MsgBox (1, "error", @error) EndIf RegWrite ($HKLM & "\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon", "DefaultPassword", "REG_SZ", $userPassword) If @error Then MsgBox (1, "error", @error) EndIf ; Pop Ups and Notification Center Registry RegWrite ("HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer", "DisableNotificationCenter", "REG_SZ", $notification) If @error Then MsgBox (1, "error", @error) EndIf RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "EnableBalloonTips", $balloon) If @error Then MsgBox (1, "error", @error) EndIf MsgBox (1, "Installation", "Install completed") EndFunc Exit EDIT: i think i figured out my problem. I was missing the space between Windows and NT. user error, sorry.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.