Novell Home

Switching from Shell to Shell

Novell Cool Solutions: Trench
By Jeremy Leonard

Digg This - Slashdot This

Posted: 6 Dec 2000
 

We use NAL.exe as the shell for most of our clients. Many of them want the shell to change with the user that is logged in. For example, an admin user logs in and gets Explorer.exe as her shell. Another user logs in and gets Nal.exe as his shell.

There has been no way to do this without two logins and the admin remembering to set the shell back to Nal.exe.

To resolve this problem I wrote a little vb app that you can put in a login script (which runs before the shell is executed) and will set the shell according to the switches you pass to it.

This program should run on Windows 95, Windows 98, Windows NT, and Windows 2000.

Usage

  1. To use this program, create two groups in NDS, one for people you want to get Explorer.exe as their shell, and the other for people you want to get Nal.exe as their shell. For example: "nalshell" and "explshell".
  2. Next, copy SETSHELL.EXE, COMDLG32.OCX, MSVBVM60.DLL to your public directory.
  3. Then add these lines to the end of your login script. (Where I have the group names be sure to use your groups' names.)

    REM ==============BEGIN NAL Shell LOGIN SCRIPT=============

    If member of ".nalshell.ou.o" then begin
    #setshell /n
    end
    If member of ".explshell.ou.o" then begin
    #setshell /e
    end

    REM ==============END NAL Shell LOGIN SCRIPT===============

  4. It important to use # for the external command and not @. # suspends execution on the login script while the external program is run. If you use @ you will get unpredictable results.

  5. Last, just add your users into their appropriate groups and you're ready to go.

The command line syntax for setshell is:

  • SetShell /e     -Sets the shell to Explorer.exe
  • SetShell /n     -Sets the shell to Nal.exe /S
  • SetShell /c custom_String     -Sets the shell to a custom string
  • SetShell     -Displays syntax help

Download

I thought other users would like this and would like to make this app available. Proceed at your own risk. As with everything else at Cool Solutions, I am not responsible for anything that might happen as a result of your usage of this tool. Download setshell.zip.

If you find this program useful, please send me an e-mail. I just want to know where it ends up. Happy "Nal"ing.

You may contact Jeremy at JeremyL@gracon.com


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell