fhuby Posted October 21, 2008 Share Posted October 21, 2008 Hello, i have a problem after running autoit. I use it in my netlogon script. If i use "Runaswait" it runs perfectly with admin rights . Everything works fine in the system if it is plugged into the Windows Domain. But if i start the system without network cable plugged i can not login, because there is the Domain missing Windows XP said so. Afer disabling autoit in my script and relogin into the domain, the login without network works fine again. what's wrong there ? Here is an example of the script: Local $sUserName = "Administrator" Local $sPassword = "Not24get" Local $sCommand = "C:\windows\system32\notpad.exe"; Just an example ; Run a command prompt as the other user. Local $pid = RunAsWait($sUserName, "SID", $sPassword, 0, $sCommand, @SystemDir , @SW_HIDE) ; Wait for the process to close. ProcessWaitClose($pid) Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 21, 2008 Share Posted October 21, 2008 (edited) Hello, i have a problem after running autoit. I use it in my netlogon script. If i use "Runaswait" it runs perfectly with admin rights . Everything works fine in the system if it is plugged into the Windows Domain. But if i start the system without network cable plugged i can not login, because there is the Domain missing Windows XP said so. Afer disabling autoit in my script and relogin into the domain, the login without network works fine again. what's wrong there ? Here is an example of the script: Local $sUserName = "Administrator" Local $sPassword = "password" Local $sCommand = "C:\windows\system32\notpad.exe"; Just an example ; Run a command prompt as the other user. Local $pid = RunAsWait($sUserName, "SID", $sPassword, 0, $sCommand, @SystemDir , @SW_HIDE) ; Wait for the process to close. ProcessWaitClose($pid) Since you are using the "SID\Administrator" domain account, you must have a network connection to a DC in the "SID" domain to authenticate it with. Edited October 21, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
fhuby Posted December 9, 2008 Author Share Posted December 9, 2008 Sorry for the delay. I think i have not say it clearly enough. The Problem is, after run Autoit with Admirights the local User can not log into Windows XP, if the Computer is not plugged into the network. the local Credentials File seems to by corrupted . The problem ist not that the scripts isn't run in localmode, this is irrelevant Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 9, 2008 Share Posted December 9, 2008 Sorry for the delay.I think i have not say it clearly enough.The Problem is, after run Autoit with Admirights the local User can not log into Windows XP, if the Computer is not plugged into the network.the local Credentials File seems to by corrupted .The problem ist not that the scripts isn't run in localmode, this is irrelevantBut this local user still has a script in their logon that tries to use a domain account. That domain account can't authenticate properly, so the script fails/hangs/whatever. You have made the local logon dependent on that domain authentication. The fix would be to make it conditional. Check connectivity with the domain first, and only run that part of the script if it's available. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
fhuby Posted December 9, 2008 Author Share Posted December 9, 2008 But this local user still has a script in their logon that tries to use a domain account. That domain account can't authenticate properly, so the script fails/hangs/whatever. You have made the local logon dependent on that domain authentication. The fix would be to make it conditional. Check connectivity with the domain first, and only run that part of the script if it's availableSorry but this isn't correct. The User has no login script locally. The Script just runs if he is logged into the Domain. The travelling User here is a user with a notebook, try to login outside the company in no DOMAINbut with his Domain account. It is not necessary to run the login script their. But he cant login because Windows says : U can not login, because the domain can not be reached.If he get back to the domain and logged in without running Server based login scripts (without using Autoit) he can login, even he it outside the domain again.Scenario :1. User log in --- Domain --- Script is Server based without using AutoIT --- User Shutdown Notebook --- User goes Out of Office -- Starts Windows login with his password and leave anything as it is --- Everything works2. User log in --- Domain --- Script is Server based with using AutoIT --- User Shutdown Notebook --- User goes Out of Office -- Starts Windows login with his password and leave anything as it is --- He can not log in because Windows says the Message i write before .It comes only if i use Autoit with runaswait as i have describe before ... (I make a just easy Loginscript for testing with just one runaswait state.) Link to comment Share on other sites More sharing options...
Developers Jos Posted December 9, 2008 Developers Share Posted December 9, 2008 Looks like the cached account info gets cleared for some reason after which a DC is needed to be able to login with a Domain account. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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