How do I create a user with a specific shell?


  1. Posts : 5
    Windows 7 Professional x32
       #1

    How do I create a user with a specific shell?


    I am trying to create users with a specific shell. The default is explorer.exe and I know how to change the shell for the individual users but I am trying to create the accounts but not have to sign in to every user to change the shell from explorer to the shell I want. Is there any batch script, command line argumant or switch, or program that can change the user's shell to the one I specify for a specific user? Kind of like those public kiosk, which load their shell when logged in by default.
      My Computer


  2. Posts : 2,798
    Windows 7 x64, Vista x64, 8.1 smartphone
       #2

    Hello isacisawindows, welcome to Seven Forums.

    If you know how to change the shell for each user, then you have to be the person who writes the batch script. - no one else knows what you are doing.
      My Computer


  3. Posts : 5
    Windows 7 Professional x32
    Thread Starter
       #3

    Still, you need to log on first


    I only know how to create the batch script to create a user. I have to log on first to that user to change the shell. I use regedit. I am wondering if I can change the shell without logging on to that user to use that user's regedit.
      My Computer


  4. Posts : 1,851
    Windows 7 pro
       #4

    What you are wanting is under HKEY_Users however it is organized by ID and not username. I'm not sure if you can do what you want to do because the SIDs are unique and vary by system. What Is an SID? (Security Identifier/SID Number)

    Maybe you could program it to search the entire tree for the appropriate branch. Try looking around. I found my shell folders in there.
      My Computer


  5. Posts : 2,798
    Windows 7 x64, Vista x64, 8.1 smartphone
       #5

    isaacisawindows said:
    I only know how to create the batch script to create a user. I have to log on first to that user to change the shell. I use regedit. I am wondering if I can change the shell without logging on to that user to use that user's regedit.
    Still not sure where you want to place the bat file, so I'll give three choices. If you got your batch file and all you want is to add it to the computer startup, then you can add a shortcut to the Windows 7 Startup Folder.

    Click on Start, select All Programs, right-click on the Startup folder and choose Open from the dropdown menu. This will open the Startup folder. Now you can copy across your Bat file into the Startup folder and it will always be there every time you you login as that user.

    Alternatively, since you have Pro edition of Windows, you can add a PowerShell script to Windows Group Policy. You can add this script either to Computer startup or to User Logon.

    First convert your bat file into a Powershell script. Then open gpedit.msc, and in the left pane of the gpedit window, navigate to Computer Configuration\Windows Settings\Scripts (Startup/Shutdown), and select Startup. In the Startup Properties select Add, then add your Powershell script by typing the path or Browsing to the file location.
    Similary you could also create a user login script. Open gpedit.msc, and in the left pane of the gpedit window, navigate to User Configuration\Windows Settings\Scripts (Logon/Logoff). and select Logon. Then repeat the procedure detailed in the previous paragraph.
    WARNING the batch file or script must work successfully, otherwise you could lock your user out of the desktop access, at every startup.
      My Computer


  6. Posts : 5
    Windows 7 Professional x32
    Thread Starter
       #6

    The shell I am talking about is the explorer desktop and taskbar that gets loaded when you log on. I am looking for how to change this so it loads my app instead of the explorer. I am trying to change it when user is created instead of logging on to that user to change the shell. I can change shell of logged in user in regedit but I want to change it for the user without logging on.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:30.
Find Us