How do I create a user with a specific shell?

isaacisawindows

New member
Local time
10:53 AM
Messages
5
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

Computer type
Laptop
Computer Manufacturer/Model Number
Lenovo
OS
Windows 7 Professional x32
CPU
Intel Core i5
Motherboard
Unknown
Memory
4GB
Graphics Card(s)
Integrated Intel HD Graphics 3000
Hard Drives
Generic/Unknown 300GB Hard Disk
Antivirus
Bitdefender Personal
Browser
Mozilla Firefox
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

Computer type
PC/Desktop
OS
Windows 7 x64, Vista x64, 8.1 smartphone
CPU
Intel E8400 65W 64-bit
Motherboard
Gigabyte EP45-UD3LR
Memory
DDR2 2 x 2GB, 1GB x 2
Graphics Card(s)
XFX Radeon HD5750
Sound Card
AMD High Definition Audio; Realtek High Definition Audio
Monitor(s) Displays
iiyama prolite X2377HDS
Screen Resolution
1920 x 1080
Hard Drives
500GB 7200 rpm Seagate ST3500413AS 16MB, 500GB 5400 rpm Toshiba MQ02ABF050H 32MB, 200GB 7200 rpm Seagate ST3200820AS 8MB, 2TB 7200 rpm Western Digital WD20EZRX 64MB
PSU
Enermax Liberty Modular
Case
Antec P193 Midi Tower
Keyboard
Mionix ZIBAL 60
Mouse
Razer USB 2.0 Diamondback Mouse or Huion Graphics Tablet
Browser
Internet Explorer, Lunascape, Firefox, Opera, Avast Safezone
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

Computer type
Laptop
Computer Manufacturer/Model Number
Lenovo
OS
Windows 7 Professional x32
CPU
Intel Core i5
Motherboard
Unknown
Memory
4GB
Graphics Card(s)
Integrated Intel HD Graphics 3000
Hard Drives
Generic/Unknown 300GB Hard Disk
Antivirus
Bitdefender Personal
Browser
Mozilla Firefox
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 Computers

System One System Two

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

Computer type
PC/Desktop
OS
Windows 7 x64, Vista x64, 8.1 smartphone
CPU
Intel E8400 65W 64-bit
Motherboard
Gigabyte EP45-UD3LR
Memory
DDR2 2 x 2GB, 1GB x 2
Graphics Card(s)
XFX Radeon HD5750
Sound Card
AMD High Definition Audio; Realtek High Definition Audio
Monitor(s) Displays
iiyama prolite X2377HDS
Screen Resolution
1920 x 1080
Hard Drives
500GB 7200 rpm Seagate ST3500413AS 16MB, 500GB 5400 rpm Toshiba MQ02ABF050H 32MB, 200GB 7200 rpm Seagate ST3200820AS 8MB, 2TB 7200 rpm Western Digital WD20EZRX 64MB
PSU
Enermax Liberty Modular
Case
Antec P193 Midi Tower
Keyboard
Mionix ZIBAL 60
Mouse
Razer USB 2.0 Diamondback Mouse or Huion Graphics Tablet
Browser
Internet Explorer, Lunascape, Firefox, Opera, Avast Safezone
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

Computer type
Laptop
Computer Manufacturer/Model Number
Lenovo
OS
Windows 7 Professional x32
CPU
Intel Core i5
Motherboard
Unknown
Memory
4GB
Graphics Card(s)
Integrated Intel HD Graphics 3000
Hard Drives
Generic/Unknown 300GB Hard Disk
Antivirus
Bitdefender Personal
Browser
Mozilla Firefox
Back
Top