Computing.Net > Forums > Novell Netware > ECHO w/ variable from login script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

ECHO w/ variable from login script

Reply to Message Icon

Name: esanford
Date: February 27, 2007 at 11:20:57 Pacific
OS: XP
CPU/Ram: -
Product: -
Comment:

I'm trying to write a text file from a login script to map a drive using vbs. It's a roundabout way to do it, but when I try to map the drive directly using something like #cmd /c "NET USE H: \\server\Shared\ /USER:%NOVELLUSER%@domain.dom.edu password" I get a resource not found error. So my login script lines look like:
#cmd /c "del C:\Temp\mapdrive.vbs"
#cmd /c "ECHO Set objNetwork = WScript.CreateObject("WScript.Network")>>C:\Temp\mapdrive.vbs"
#cmd /k "ECHO objNetwork.MapNetworkDrive "K:" , "\\server\Shared" , false , " _>>C:\Temp\mapdrive.vbs"
#cmd /k "ECHO %NovellUser%@domain.dom.edu" , "password">>C:\Temp\mapdrive.vbs"

When I run that I get objNetwork.MapNetworkDrive "K:" , "\\Ramsey.itdean.umn.edu\Shared" , false , " _>>C:\Temp\mapdrive.vbs echoed to the cmd window but not to the file. Plus I haven't figured out why it won't parse the environment variable before echoing.

Ideas??



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: ECHO w/ variable from login script

Run *.exe from login script www.computing.net/answers/netware/run-exe-from-login-script/3661.html

setting path variables in login script www.computing.net/answers/netware/setting-path-variables-in-login-script/304.html

run batch file from login script www.computing.net/answers/netware/run-batch-file-from-login-script/5474.html