AnthonyBNYC Posted February 17, 2019 Share Posted February 17, 2019 I feel like i have seen this on here but cannot find the right one. I have a "simple" script I need an assist with. Just need the ability to map a couple of drive letters using the domain credentials of the user. The vpn connection to the corporate LAN will be up and running already. I just need and exe file that prompts a user for their username and password. Ideally, it will add the domain prefix so that the user doesn't have to type "domain name\.."" before their username. They would just type in the username and password and the drives will map. This works on a simple dos net use command but I need something fool proof for the users. If anyone can help I will be eternally grateful and will send blessing and a big chunk of good karma that I was saving up. Anthony Link to comment Share on other sites More sharing options...
Earthshine Posted February 17, 2019 Share Posted February 17, 2019 Post your script for help My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 18, 2019 Moderators Share Posted February 18, 2019 Moved to the appropriate forum. Moderation Team Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
AnthonyBNYC Posted February 18, 2019 Author Share Posted February 18, 2019 Hi EarthShine Please see my script below. All I am looking for is to be able to run this script after my VPN is connected and map drives to my file server as a user with the following username format"cwf\username" If i connect with the VPN client currently and just do a simple DOS batch file with NET USE commands i can authenticate iwth the username and password format above. Hoping there is a way I can present something for my users that is even easier than a batch file and as foolproof as possible. I'd appreciate any help you might be able to give. thanks Anthony bhtest3.au3 Link to comment Share on other sites More sharing options...
Earthshine Posted February 18, 2019 Share Posted February 18, 2019 (edited) you can build those net use commands and run them in autoit. we just use a bat file, just take what you have and the connect button should run the commands. for example the bat looks like this. @echo off SET /p usrname=Enter Your User Name: REM Establish authenticated connection NET USE \\192.168.1.135 /user:YOUR_DOMAIN\%usrname% NET USE S: \\192.168.1.135\s NET USE W: \\192.168.1.135\w look at RunWait Edited February 18, 2019 by Earthshine My resources are limited. You must ask the right questions 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