This post is overkill and is a non-AutoIt solution, but here goes...
Are there only certain things that AutoIt is supposed to be used for?? For me it is a very important solution and if this works (however simple it may be to you) it would possibly allow me to introduce it to a company as a solution for improved patch management and other repetative tasks that require admin rights that could be compiled so that admin credentials can be passed securely....
if $errorcheck = 0 then msgbox(0,"Upgrade","OS doesn't support running as another user")
This seemed to work but I'm trying to hardcode admin credentials in the compliled script so anyone can run it from a network share. I only listed one patch here but have several to apply. I have a batch file that contains all the patches and command line switches that I run when I deploy a new machine. In an effort to make life easier I am trying to use this script with admin rights run the batch file which would allow a user that is not an admin to run them. All the machines have the same generic local admin account.
[post="103140"]<{POST_SNAPBACK}>[/post]
seemed to work meaning that you didn't get to see the message saying that the operating system doesn't support? and i just thought of something also. in order to apply the patch, you have to be using the login info of the local administrator right? few things to check in your RunAsSet()... i dont' think you want to use the 2 flag on the end to check the credentials with local users...maybe a 0? also, maybe try to use "" for the domain, or "MachineName" with machinename obviously being the computer name...
Just out of curiosity, is your batch file hardcoded with specific patch filenames, or do you generally run all patches in the share? If they're hardcoded, you might think about using an INI file for a list of patches to apply and eliminate the batch file. If you're applying all patches in the share, you might think about using FileFindNextFile to have AutoIt cycle through all of them and force a reboot and eliminate the batch file.
Lastly, are you using QCheck before you reboot? WinXP/2003+ don't require it, but Win2K still does to the best of my knowledge.
<{POST_SNAPBACK}>
Yes I they are hardcoded in the batch file and I really like the filefindnext... I will try that and yes I am using qchain and it is 2000.
seemed to work meaning that you didn't get to see the message saying that the operating system doesn't support? and i just thought of something also. in order to apply the patch, you have to be using the login info of the local administrator right? few things to check in your RunAsSet()... i dont' think you want to use the 2 flag on the end to check the credentials with local users...maybe a 0? also, maybe try to use "" for the domain, or "MachineName" with machinename obviously being the computer name...
<{POST_SNAPBACK}>
with auto it can you pass the machine name "." so that it can be run on anymachine as long as the local credentials are there?
with auto it can you pass the machine name "." so that it can be run on anymachine as long as the local credentials are there?
I will change the flag to a 0 as well.
<{POST_SNAPBACK}>
Don't think so, but you can use @ComputerName, but dont' surround it with quotes like a literal string when you use it. it's a macro, you have to treat it like a variable
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!
Recommended Posts
kansaspcdoc
seandisanti
kansaspcdoc
kansaspcdoc
I will change the flag to a 0 as well.
seandisanti