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
Net Use M: \\192.168.1.22\video /user:admin AS3145florida Maps
Net Use M: \\192.168.1.22\video /user:admin ^7dUff2*! Errors
ASKER
are those 3 the only ones I need to change?
yes, letters and numbers are all acceptable.
ASKER
Really? There are no allowable special characters in windows?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ahhh. Makes sense. Thanks for the help.
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. :-)
sorry for the typos as i was typing the message using my phone, but i guess you did get what i meant. :-)
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:
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*!"
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.
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.
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
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
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. :-)