|
|
|||||||
Hi. I have this problem when using Sendkeys. I am using the following code to run a program with adminstrative rights. It works on about half of the machines. On the machines where it doesn't work the Runas dialog box becomes stuck on their Windows 2000 screen. It is awaiting a password entry. Would it be possible that the Sendkeys password was implemented to quickly into the Runas dialog box? See below for the code that I am using: (Please not thet this code segment is contained within an IF statement). SETTITLE ("SENDKEYS") run 'runas /user:domainname\username "\\servername\Ant-virusV\AVcheck.bat"' $SK SetFocus ("SENDKEYS") $SK= sendkeys("password{enter}") |
||||||||
|
|
|||||||
Your line: $SK SetFocus ("SENDKEYS") is missing the = $SK= SetFocus ("SENDKEYS") but really, that is not good enough anyway. You need to put it into a wait loop. code:Break on |
||||||||
|
|
|||||||
You might want to read Installing an Application as an Admin as there are more secure ways compared to what you try to do. |
||||||||
|
|
|||||||
OOPS! Forgot to give my Doom and Gloom, and Security Sins, Hellfire and Brimstone speech on using SU and RunAs. What was I thinking... I usually just boycott these topics. |
||||||||
|
|
|||||||
Can we have that as a FAQ and then just point people to it as soon as a post contains the word RUNAS ? |
||||||||
|
|
|||||||
Like I said, I usually just sit on my hands. Was focused more on just the SendKeys() part. If I were Chief Information Security Officer, I would fire anyone that passed passwords through a logon script! [ 24. July 2003, 17:51: Message edited by: LLigetfa ] |
||||||||
|
|
|||||||
The account does not use a Domain Adminsitrator account...just an account that is added to the local adminstrators group using Windows Group Policy...Also on completion, the script will be encrypted. Still having trouble tring to implement the while using my code example. Thanks |
||||||||
|
|
|||||||
A domain account that gets me local admin access to every machine is still dangerous. With it, I could hack to every computer in the org over the network, install keyloggers and start collecting passwords! |