MooglePower Posted June 10, 2010 Posted June 10, 2010 I have a script already that prompts for a username and password and then maps drives and creates shortcuts on the desktop. It works perfectly except for one thing. I'd like to make it so that there's an authentication before it creates anything. If the username and password are fine, then it maps the drives. If the username and password are incorrect, then it tells the user this information before doing anything else. Currently, if users input the wrong username and/or password, the shortcuts are created but they point to nothing (since the drive mapping failed). The script itself acts like nothing is wrong. I just want to make sure that none of this happens if users can't authenticate.
Xenobiologist Posted June 10, 2010 Posted June 10, 2010 No problem. Where do you want to read the user+pwd info from ? hardcoded in your script? A file somewhere on a share? After that, just use something like If $theStufftheuserinpput (maybe with GuiCtrlRead($yourControl) = $theValueToMatch Then ... Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
MooglePower Posted June 10, 2010 Author Posted June 10, 2010 Ah, I was meaning to authenticate against our network using Active Directory, although I think I figured out a way to do it. Thanks for your help!
water Posted June 11, 2010 Posted June 11, 2010 You can use the Active Directory UDF (for download please see my signature) to do some checking against AD. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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