Batch Net Use Error
Contents |
activation email? 1 Hour 1 Day 1 Week 1 Month Forever Login with username, password and session length Forum only search News: Home Help Login Register Computer Hope » Microsoft » Microsoft
Batch Net Use Errorlevel
DOS » Batch File error handling using Net Use « previous next » batch net use password Print Pages: [1] Go Down Author Topic: Batch File error handling using Net Use (Read 12405 times) 0 Members
Batch File Net Use
and 1 Guest are viewing this topic. getintanked Guest Batch File error handling using Net Use « on: August 17, 2007, 05:25:36 PM » I am creating a batch file that allows batch script net use users to re-map their Home network share drive after a vpn connection has been made. Since the mapping is based on their profile, this won't push unless they logon while connected to our network.We have many offsite locations so, I made it so they have to choose their location and it will map based on their local domain controller.However, when using NET USE there are dos batch net use a few instances when errors can occur (always user error...)For example. If they haven't vpn'd in yet, its going to throw an error stating that the network path cannot be found - I want to catch this error and replace it with something like "make sure you have a live internet connection and you can reach the intranet home page first, and try again"Same goes for if they are allready mapped and they are running the batch file again, it will say something about the drive letter is already in use... and i would like to replace that error with "Your drive is already mapped, open your my computer and access your H:/ Drive"Code: [Select]title ~ AVI Information Technology ~ Map My Home Drive
@ECHO OFF
CLS
ECHO ------------------------------
ECHO Name of the Company
ECHO ------------------------------
ECHO Please select your home office location...
:LOOP
ECHO A. Altamonte
ECHO B. Atlanta
ECHO C. Cleveland
ECHO D. Columbia
ECHO E. Cypress
ECHO F. Dallas
ECHO G. Denver
ECHO H. Detroit
ECHO I. Ft. Lauderdale
ECHO J. Jacksonville
ECHO K. Lanham
ECHO L. Las Vegas
ECHO M. Nashville
ECHO N. New York
ECHO
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers
Batch Net Use Delete
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x batch net use persistent Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it
Windows Batch Net Use
only takes a minute: Sign up 'NET USE' works in CMD but not in batch up vote 0 down vote favorite This command will work in CMD if i copy and paste it from my batch file to CMD. When http://www.computerhope.com/forum/index.php?topic=40902.0 I run my batch file, it tells me access is denied (System Error 5). Any idea what I need to do to fix this? NET USE * "\server\folder\" "password" /USER:domain\username batch-file cmd drive share|improve this question asked Oct 23 '14 at 23:38 hartley054 39211 1 you shouldn't have to surround your pathword with " –Loïc MICHEL Oct 24 '14 at 9:14 That depends on what characters are present in the password. –Bill_Stewart Oct 28 '14 at 16:07 add http://stackoverflow.com/questions/26539283/net-use-works-in-cmd-but-not-in-batch a comment| 2 Answers 2 active oldest votes up vote 0 down vote Try the following (Im assuming that * is a drive letter, fill in the angle braces): net use
One games Xbox 360 games PC https://support.microsoft.com/en-us/kb/253821 games Windows games Windows phone games Entertainment All Entertainment Movies & TV Music Business & Education Business Students & educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security net use Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft batch net use Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft