Jump to content

Recommended Posts

Posted (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 by denmyos
Posted
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
Posted
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.

Posted
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.

Posted
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.

Posted
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.

Posted
Its a public library, it was done for financial reason.

 

We've saved money! -- now everything takes 5 times longer, that costs more money!

Posted

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?

Posted
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

Posted
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. :)

Posted
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.

Posted
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.

Posted
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

Posted
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.

Posted
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.

Posted (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 by denmyos
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...