Computing.Net > Forums > Novell Netware > Login scripts/batch files

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.

Login scripts/batch files

Reply to Message Icon

Name: Shane
Date: December 6, 2001 at 05:58:58 Pacific
Comment:

Does anyone have a suggestion/solution on running a batch file from within the login script (not at the end after an exit), but not having to manually close the spawned window?

For example, I create a batch file, test.bat, and call it from the middle of my login script. The test.bat file runs, but I am left with a DOS window with 'finished' at the top.

I can create a pif, modify it to close automatically, but that only seems to work on the machine I created the pif file from, although I have copied to a common area on the network. I launch the pif from another workstation, and I still have to close the window.




Sponsored Link
Ads by Google

Response Number 1
Name: MM
Date: December 6, 2001 at 06:13:14 Pacific
Reply:

Try initially to set up a once-off copy command in the login script to copy the working pif file to the local workstation when the user logs in. When all users have logged in they should a have a copy of the pif file that should behave the same as the original one.

Might work.


0

Response Number 2
Name: Scifi
Date: December 7, 2001 at 09:07:55 Pacific
Reply:

Have you tried putting the word "Exit" at the end of your dos batch file?


0

Response Number 3
Name: Shane
Date: December 8, 2001 at 08:17:14 Pacific
Reply:

I previously tried exit. Still did not work.


0

Response Number 4
Name: gary
Date: December 10, 2001 at 09:09:56 Pacific
Reply:

This is how I used batch commands in a script. Though it has been a few years.

#command /c name.bat

Make sure this follows any DOS/WIN search
paths. The name.bat can have any prefix you prefer upto an 8 character word.

............................................

or you can use the EXIT command at the end of their last login script.

EXIT "name.bat"

You are limited to an 7 character prefix name.

There are some great examples of some of these on novell's knowledgebase.



0

Response Number 5
Name: Shane
Date: December 10, 2001 at 10:39:39 Pacific
Reply:

Launching the batch files are not a problem. I am attempting to figure out/understand how to close the spawned DOS window automatically.

To clarify, this is not an 'exit' batch file, rather one I wish to call in the middle of the script, and I have attempted to invoke an exit at the end of a batch file.

I use this line in my scripts to capture some user data.
no keys------
#COMMAND /C ECHO %LOGIN_NAME %P_STATION %DAY_OF_WEEK %MONTH_NAME %DAY,%YEAR %HOUR:%MINUTE %AM_PM %OS %OS_VERSION %NETWORK_ADDRESS >>SYS:LOGIN\LOGINS\%LOGIN_NAME
no keys------
It closes automatically, but I am only doing an echo, not a batch file. The batch files are the ones giving me fites.

Thanks for all the suggestions, but nothing has worked yet.

Shane


0

Related Posts

See More



Response Number 6
Name: Alon
Date: January 8, 2002 at 06:20:06 Pacific
Reply:

I had the same problem.
and the solution is as follow:
1. Put The Command EXIT in the end of the bat file.
2. Then Do Right Click On The Bat File Then Go To Properties -> Program There You Will See A Check Box
With The Label "Close On Exit" Make Sure It Is Mark On.

Thats All It Should Work For You As It Work For Me.


0

Response Number 7
Name: David
Date: January 14, 2002 at 20:00:02 Pacific
Reply:

Try using the call or start command to invoke one batch from another. Syntax:

CALL batch.bat
or
START batch.bat

Might work.



0

Response Number 8
Name: Corey Masson
Date: January 24, 2002 at 23:39:25 Pacific
Reply:

If you are in a true 32-Bit env (NT/2K/XP)use the following commands as a guide. Just Cut and past it and run it. This will shell out and exit the shell it is in.

@ echo off
cmd /q /c "net use lpt1 /delete > nul"
cmd /q /c "net use lpt1 \\dynamics\xerox > nul"


0

Response Number 9
Name: Tony
Date: January 31, 2002 at 14:24:26 Pacific
Reply:

I had the same problem on NT and Win2k.

I argree, put the EXIT command at the end of the login script listed in the User profile.

Worked for me.

Good luck


0

Response Number 10
Name: tony
Date: February 1, 2002 at 06:38:32 Pacific
Reply:

Sorry about the last post. My fingers were typing faster than my brain was thinking.

What I meant to say was that I put the EXIT command at the end of the batch file that is INSIDE the script that is listed in the user profile.


Sorry about the confusion.


0

Response Number 11
Name: Mike
Date: February 4, 2002 at 15:06:00 Pacific
Reply:

I was running into the same problem and needed a coding solution since this batch file will be used on multiple machines and using PIF's is not an option. After doing some research, I found that although the Exit command ends the session with DOS, this does not necessarly close the window if there is something to display. Add a CLS at the end of your batch code to clear the screen. This will cause the DOS window to close since there's nothing to display when it's done. Hope that helps.

Mike


0

Response Number 12
Name: Steven Morrissey
Date: March 30, 2002 at 07:24:12 Pacific
Reply:

Well very simple, all you need to do is right click the batch file > Properties goto to the next tab where you have the option "Close on Exit" select it, Apply then Ok and problem solved.

Any more probs just mail me : Help@Opti-Net.co.uk


0

Response Number 13
Name: Renaissance Man
Date: March 30, 2002 at 14:51:31 Pacific
Reply:

Also, before EXIT, put CLS.

ONE of the reasons for a window not closing is because of data on the screen.

Since I found this out, I end all batch files run from within windows with

cls
exit


0

Response Number 14
Name: Sam
Date: April 23, 2002 at 12:41:44 Pacific
Reply:

Thanks guys, this has been pretty helpful --

I have a bit of a challenge: I create a batch file programmatically, so I don't have the luxury of right clicking and setting the properties. Anyone know how to set these properties programmatically?


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Novell Netware Forum Home


Sponsored links

Ads by Google


Results for: Login scripts/batch files

Login script question www.computing.net/answers/netware/login-script-question/3105.html

batch file login script www.computing.net/answers/netware/batch-file-login-script/3199.html

batch file and login script Ntware5 www.computing.net/answers/netware/batch-file-and-login-script-ntware5/2465.html