denmyos Posted May 16, 2019 Posted May 16, 2019 (edited) I have about 100 computer in a workgroup where i need to enable the Users CMD, it has been disable via the regedit. (the administrator cmd is already working) To disable the cmd we used this command: [HKEY_USERS\TEMP\Software\Policies\Microsoft\Windows\System]"DisableCMD"=dword:00000001 In a task sequence in Sccm, when we deployed the computer. To enable the CMD im using this, in a CMD script: (in Faronics deepfreeze consol) @echo off reg LOAD HKU\TEMP "C:\Users\Default\NTUSER.DAT" reg ADD "HKU\TEMP\Software\Policies\Microsoft\Windows\System" /t REG_DWORD /f /v "DisableCMD" /d 0 reg UNLOAD HKU\TEMP reg LOAD HKU\TEMP "C:\Users\Bruger\NTUSER.DAT" reg ADD "HKU\TEMP\Software\Policies\Microsoft\Windows\System" /t REG_DWORD /f /v "DisableCMD" /d 0 reg UNLOAD HKU\TEMP But that does not seem to work. It does nothing in the regedit, even tried to fire of a .cmd directly on the computer, but still nothing change in the regedit. Help will be much appreciated Thank you Edited May 16, 2019 by denmyos
sted Posted May 16, 2019 Posted May 16, 2019 your probably better off creating a .reg file (so set up the registry as you want it on 1 pc then export as a reg file and then use regedit /s filename.reg as your script
denmyos Posted May 16, 2019 Author Posted May 16, 2019 your probably better off creating a .reg file (so set up the registry as you want it on 1 pc then export as a reg file and then use regedit /s filename.reg as your script I can't really take one pc out of the Environment to tweak it. I would rather just fire of a short scripts, not a whole new regedit.
Fazza Posted May 16, 2019 Posted May 16, 2019 I can't really take one pc out of the Environment to tweak it. I would rather just fire of a short scripts, not a whole new regedit. A regedit will be a lot shorted than your script as it's just a single line of code.
mavhc Posted May 16, 2019 Posted May 16, 2019 Group Policy Preferences to set registry keys for a group
sted Posted May 16, 2019 Posted May 16, 2019 Group Policy Preferences to set registry keys for a group not in a workgroup though
mavhc Posted May 16, 2019 Posted May 16, 2019 True, who has workgroups any more though? That's weird. What's the reason to have a workgroup?
denmyos Posted May 17, 2019 Author Posted May 17, 2019 True, who has workgroups any more though? That's weird. What's the reason to have a workgroup? Its a public library, it was done for financial reason.
denmyos Posted May 17, 2019 Author Posted May 17, 2019 A regedit will be a lot shorted than your script as it's just a single line of code. Ok, i tried it. I export the whole regedit from 1 computer (238mb) and wanna import it into another computer. I have try ti directly import it into the regedit. I have tried to merge it And made a batch file I get the same error "cannot import c:\bat_folder\sogemaskine_reg.reg:error accessing the registry." Its the same version as the export: version 1803 (OS Build 17134.407) Any idears.
mavhc Posted May 17, 2019 Posted May 17, 2019 Its a public library, it was done for financial reason. We've saved money! -- now everything takes 5 times longer, that costs more money!
denmyos Posted May 17, 2019 Author Posted May 17, 2019 We've saved money! -- now everything takes 5 times longer, that costs more money! I totally agree
QwertyMash Posted May 17, 2019 Posted May 17, 2019 If the script is running under their credentials not as an administrator it won't work as they won't have access to modify the registry key. Is it being executed as a standard user or administrator?
denmyos Posted May 17, 2019 Author Posted May 17, 2019 If the script is running under their credentials not as an administrator it won't work as they won't have access to modify the registry key. Is it being executed as a standard user or administrator? Always as administrator
QwertyMash Posted May 17, 2019 Posted May 17, 2019 The users always log on as admin? What operating system you running? and how are you delivering the script?
denmyos Posted May 17, 2019 Author Posted May 17, 2019 The .bat file looks like this Regedit c:\bat_folder\sogemaskine_reg.reg
QwertyMash Posted May 17, 2019 Posted May 17, 2019 So its a batch file. What operating system are you using? 7? 10? How is it being executed?
denmyos Posted May 17, 2019 Author Posted May 17, 2019 The users always log on as admin? What operating system you running? and how are you delivering the script? I exported the regedit as administrator. And Import/tried the bat file/Merge the .reg in the administrator profil and ran everything as "run as administrator" and the same time. Sounds confusing when i type it.
QwertyMash Posted May 17, 2019 Posted May 17, 2019 What operating system are you on? What is the regkey when it is disabled and what is it when it is enabled? Will look at a script for you.
Norphy Posted May 17, 2019 Posted May 17, 2019 Ok, i tried it. I export the whole regedit from 1 computer (238mb) and wanna import it into another computer. I have try ti directly import it into the regedit. I have tried to merge it And made a batch file I get the same error "cannot import c:\bat_folder\sogemaskine_reg.reg:error accessing the registry." Its the same version as the export: version 1803 (OS Build 17134.407) Any idears. Hold on. You dumped the entire registry from one computer and tried to apply it to another? Baaaaad idea. There are going to be a whole shedload of entries in that registry dump which are unique to that computer and attempting to apply it to another will... well I'd hate to think what it would do if it worked. Extract the bits that you need and apply those only.
denmyos Posted May 17, 2019 Author Posted May 17, 2019 Hold on. You dumped the entire registry from one computer and tried to apply it to another? Baaaaad idea. There are going to be a whole shedload of entries in that registry dump which are unique to that computer and attempting to apply it to another will... well I'd hate to think what it would do if it worked. Extract the bits that you need and apply those only. they are from the same image, so it should work? or maybe not. Ill try with the bits.
QwertyMash Posted May 17, 2019 Posted May 17, 2019 they are from the same image, so it should work? or maybe not. Ill try with the bits. Yeah don't be doing that. That is an awful idea. WHAT OPERATING SYSTEM IS IT!!!!! haha
Fazza Posted May 17, 2019 Posted May 17, 2019 they are from the same image, so it should work? or maybe not. Ill try with the bits. Only import the one line you want to change, do not do the whole thing else it will take forever and may stop the computers working.
QwertyMash Posted May 17, 2019 Posted May 17, 2019 Only import the one line you want to change, do not do the whole thing else it will take forever and may stop the computers working. Very correct like, a fully registry dump and slap will likely cause a lot of odd issues.
denmyos Posted May 17, 2019 Author Posted May 17, 2019 (edited) What operating system are you on? What is the regkey when it is disabled and what is it when it is enabled? Will look at a script for you. Win10 1803 This was my original script @echo offreg LOAD HKU\TEMP "C:\Users\Default\NTUSER.DAT" reg ADD "HKU\TEMP\Software\Policies\Microsoft\Windows\System" /t REG_DWORD /f /v "DisableCMD" /d 0 reg UNLOAD HKU\TEMP reg LOAD HKU\TEMP "C:\Users\Bruger\NTUSER.DAT" reg ADD "HKU\TEMP\Software\Policies\Microsoft\Windows\System" /t REG_DWORD /f /v "DisableCMD" /d 0 reg UNLOAD HKU\TEMP used in a .cmd But that didn´t seem to work, it does nothing in regedit. The CMD is disable in the image, i need to enable it. The original key looks like this: [HKEY_USERS\S-1-5-21-3546664622-4044459794-97118655-1001\Software\Policies\Microsoft\Windows\System]"DisableCMD"=dword:00000001 The only thing i need to do (in theory ) is to put a 0 instead of the 1. Edited May 17, 2019 by denmyos
clareq Posted May 17, 2019 Posted May 17, 2019 Try setting it in HKCU Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System] "DisableCMD"=dword:00000000 Put the code in notepad and save it as .reg.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now