Avatar of SpaceCoastLife
SpaceCoastLife

asked on 

How to run a logo script?

Attempting to run a logon script in windows 10 which is new territory for me insofar as acceptable characters. For example, the first one runs fine, the 2nd one does not. Why?

Net Use M: \\192.168.1.22\video /user:admin AS3145florida   Maps



Net Use M: \\192.168.1.22\video /user:admin ^7dUff2*!           Errors
Windows Networking

Avatar of undefined
Last Comment
Steve Knight
Avatar of bbao
bbao
Flag of Australia image

because the 2nd one having invalid symbols that are not acceptable at Windows command line due to history reason.

i know the actual password might be correct, but the ^, *,  and ! symbols can't be accepted here.

you have to change the password if you do need to use command line to map the drive here. :-)
Avatar of SpaceCoastLife
SpaceCoastLife

ASKER

are those 3 the only ones I need to change?
Avatar of bbao
bbao
Flag of Australia image

yes, letters and numbers are all acceptable.
Avatar of SpaceCoastLife

ASKER

Really? There are no allowable special characters in windows?
ASKER CERTIFIED SOLUTION
Avatar of bbao
bbao
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of SpaceCoastLife

ASKER

ahhh. Makes sense. Thanks for the help.
Avatar of bbao
bbao
Flag of Australia image

thanks for accepting my answer.

sorry for the typos as i was typing the message using my phone, but i guess you did get what i meant. :-)
Avatar of oBdA
oBdA

Sorry, but that answer is incorrect.
These characters may be invalid for a filename, but not for a password.
The issue here is that the caret ^ is the escape character in Batch, so the string that's actually passed to net.exe as password is "7dUff2*!".
All you have to do is enclose the argument in double quotes:
net.exe use M: \\192.168.1.22\video /user:admin "^7dUff2*!"

Open in new window

Avatar of bbao
bbao
Flag of Australia image

thanks for correcting me oBdA.

i just tested, yes, using double quotes: is the way to enter a password with symbols.

hence the old DOS limitation doesn't apply here for passwords in a Command Prompt window in Windows, though the other DOS limitation may still apply e.g. special device names such as CON or PRN can't be used as a file name.
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

And to add another comment here.... seriously, passwords in plain text in a batch file login script that by definition anyone can read and even see scroll over their screen?!!!!  I presume maybe pointing at a simple NAS share that isn't integrated with your AD?

If you really can't use AD accounts, I would suggest getting credentials added as one-off to the user's profiles e.g.

cmdkey /add:\\server\share /user:username /pass:password

then can map the drive using the saved credentials with

net use n: \\server\share

or if you really have to storing the password partially hidden as part of the batch file using ADS -- this is still readable if you know how:  http://scripts.dragon-it.co.uk/links/batch-password1

Steve
Windows Networking
Windows Networking

The Windows operating systems have distinct methodologies for designing and implementing networks, and have specific systems to accomplish various networking processes, such as Exchange for email, Sharepoint for shared files and programs, and IIS for delivery of web pages. Microsoft also produces server technologies for networked database use, security and virtualization.

51K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo