JATO Posted January 2, 2007 Posted January 2, 2007 Trying to automate a Database install. The MDB file fires off a VB macro that creates an ODBC connection. Problem is.. that normal users don't have Power User or Admin rights to create the ODBC connection.How can I make AutoIt run the ShellExecute command as a Admin? I know RunAs works for EXEs... but not MDB files....right?Otherwise I have to log the user off and log in as admin myself to install, which defeats the purpose of the AutoIt script.Any assistance would be greatly appreciated.Thanks ~J. Schutzmanwww.alchemistgamer.com
Richard Robertson Posted January 2, 2007 Posted January 2, 2007 Did you ever try just running the program that uses mdb files? Send it as a command line parameter.
JATO Posted January 2, 2007 Author Posted January 2, 2007 DOHH! Didn't even think of THAT.. THANK YOU :"> found that MSAccess.exe supports /switches "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "c:\database.mdb" /user _____ /pwd _____ OR, I could just use the RunAsSet command in AutoIt and use "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "c:\database.mdb" Thanks a bunch for pointing out the 1 thing I overlooked. ~J. Schutzmanwww.alchemistgamer.com
Richard Robertson Posted January 3, 2007 Posted January 3, 2007 I'm glad to help. I have those moments like that sometimes.
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