Jump to content

ShellExecute as Admin


JATO
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...