tommykx Posted February 27, 2014 Share Posted February 27, 2014 Hi all. I'm new in autoit. I've write a service that check if a user i logged or not. If not the script write some reg for autologin and reboot. This work perfectly in xp but not in win7. I think that is a limit adding reg entry. Someone know how to? Link to comment Share on other sites More sharing options...
JohnOne Posted February 27, 2014 Share Posted February 27, 2014 post code AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
tommykx Posted February 27, 2014 Author Share Posted February 27, 2014 Thnk you JohnOne. The code i use to write reg is: Func AutoLogon($usernameFn, $passwordFn = "");Write autologon information to registry Local $tempRegkey = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon" RegWrite($tempRegkey, "DefaultUserName", "REG_SZ", $usernameFn) RegWrite($tempRegkey, "DefaultPassword", "REG_SZ", $userPasswordFn) RegWrite($tempRegkey, "AutoAdminLogon", "REG_SZ", "1") ;RegWrite($tempRegkey, "AutoLogonCount", "REG_DWORD", "1") RegWrite($tempRegkey, "DefaultDomainName", "REG_SZ", @ComputerName) EndFunc ;==>AutoLogon i've tryed also with a bat file "RunAs" a machine user (admin) but with no effect... Link to comment Share on other sites More sharing options...
JohnOne Posted February 27, 2014 Share Posted February 27, 2014 In win7 you probably need #requireadmin to write to HKLM. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
tommykx Posted February 27, 2014 Author Share Posted February 27, 2014 Thank you... may be is the solution but i'm running as a service... can i use it in this case? Link to comment Share on other sites More sharing options...
JohnOne Posted February 27, 2014 Share Posted February 27, 2014 My mistake, sorry. I doubt that would work. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
tommykx Posted February 27, 2014 Author Share Posted February 27, 2014 So you think that there's no solution? Link to comment Share on other sites More sharing options...
JohnOne Posted February 27, 2014 Share Posted February 27, 2014 I did not mean that, just that =requireadmin will probably not work in this case. There is of course, only one way to find out... AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Gianni Posted February 28, 2014 Share Posted February 28, 2014 (edited) if win7 is x64 then registry key names are different from x86 have a look >here or >here Edited February 28, 2014 by PincoPanco Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now