plgii Posted December 31, 2008 Share Posted December 31, 2008 Wrote this so that laptop users cannot install software without me knowing and approving. Basically laptop user is set to poweruser, not administrator and if they need to install something they run the plc-installer. This lets them choose setup file and then generates code. I then enter code into the code-generator and I give them the resulting code which then allows them to install as administrator. All works fine except I came across an install, that once code is entered on laptop, it pops up the default Windows "RunAs" dialog box wanting the administrator password. This obviously defeats the script. Other install programs act as it should and lets install begin, so not sure if I missed something. I can't include the software that is giving this issue because it is too large to upload, but maybe someone can see a problem and point me in the right direction. I have included the installer-code and code generator-code.Copy_of_plc_installer.au3code_generator.au3 Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 31, 2008 Share Posted December 31, 2008 Wrote this so that laptop users cannot install software without me knowing and approving. Basically laptop user is set to poweruser, not administrator and if they need to install something they run the plc-installer. This lets them choose setup file and then generates code. I then enter code into the code-generator and I give them the resulting code which then allows them to install as administrator. All works fine except I came across an install, that once code is entered on laptop, it pops up the default Windows "RunAs" dialog box wanting the administrator password. This obviously defeats the script. Other install programs act as it should and lets install begin, so not sure if I missed something. I can't include the software that is giving this issue because it is too large to upload, but maybe someone can see a problem and point me in the right direction. I have included the installer-code and code generator-code.What version of AutoIt are you using? RunAsSet() was removed as a separate step and replaced with RunAs() and RunAsWait().You have your admin username and password hard-coded in your script, which is bad practice and not secure, but not related to your problem. 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...
plgii Posted December 31, 2008 Author Share Posted December 31, 2008 Wrote this so that laptop users cannot install software without me knowing and approving. Basically laptop user is set to poweruser, not administrator and if they need to install something they run the plc-installer. This lets them choose setup file and then generates code. I then enter code into the code-generator and I give them the resulting code which then allows them to install as administrator. All works fine except I came across an install, that once code is entered on laptop, it pops up the default Windows "RunAs" dialog box wanting the administrator password. This obviously defeats the script. Other install programs act as it should and lets install begin, so not sure if I missed something. I can't include the software that is giving this issue because it is too large to upload, but maybe someone can see a problem and point me in the right direction. I have included the installer-code and code generator-code.3.1.1.0users won't know or understand how to get password, so not really an issue. I just want to be sure it will work on different installations and not sure why it prompts for runas under certain installs. Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 31, 2008 Share Posted December 31, 2008 3.1.1.0users won't know or understand how to get password, so not really an issue. I just want to be sure it will work on different installations and not sure why it prompts for runas under certain installs.Eeek! AutoIt version 3.1.1 was released April 2005! I wouldn't call that a supported version anymore... 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...
plgii Posted December 31, 2008 Author Share Posted December 31, 2008 3.1.1.0users won't know or understand how to get password, so not really an issue. I just want to be sure it will work on different installations and not sure why it prompts for runas under certain installs.I just upgraded to 3.3, but it appears that this installer calls a dll from the setup.exe, so this must be why it pops the default runas dialog Link to comment Share on other sites More sharing options...
plgii Posted December 31, 2008 Author Share Posted December 31, 2008 Eeek! AutoIt version 3.1.1 was released April 2005! I wouldn't call that a supported version anymore... I now see it is a macrovision installer and it prompts for runas if I click on setup.exe if logged on a limited user, so for some reason it will not respond to the RunAsWait() setting it to administrator...Any thoughts? Link to comment Share on other sites More sharing options...
plgii Posted January 2, 2009 Author Share Posted January 2, 2009 Got it working. Had to split filename to use ShellExecuteWait for "msi" installs and RunWait for all other installers. Maybe others can use scriptsWorking_Installer.au3installer_code_generator.au3 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