Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: need help with command prompt command

26 Sep 2014   #1
junqi89

windows 7 64bit
 
 
need help with command prompt command

Code:
 
@Echo Off
Title Sccm
cd %systemroot%\system32
call :IsAdmin
 
 
Reg.exe add "HKLM\SOFTWARE\Microsoft\CCM\CcmExec" /v "SystemTaskExcludes" /t REG_SZ /d "" /f
Reg.exe add "HKLM\SOFTWARE\Microsoft\CCM\CcmExec" /v "ProvisioningMode" /t REG_SZ /d "false" /f
Reg.exe add "HKLM\SOFTWARE\Microsoft\SMS\Mobile Client\Software Distribution\State" /v "Paused" /t REG_DWORD /d "0" /f
Reg.exe add "HKLM\SOFTWARE\Microsoft\SMS\Mobile Client\Software Distribution\State" /v "PausedCookie" /t REG_DWORD /d "0" /f
Exit
 
 
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
Cls & Echo You must have administrator rights to continue ... 
Pause & Exit
)
Cls
goto:eof
let say my computer have a the same folder in the registry but different value. by using this command it wont merge it. so how do i actually add in a merge with this ?


My System SpecsSystem Spec
.
26 Sep 2014   #2
Tookeri

Windows 7 Pro 32
 
 

By folder I assume you mean Key. The /f parameter you use should overwrite any current value. Are you saying that doesn't work?

If you remove /f and a value already exist for a key, you'll be prompted if you want to overwrite the current value. That's a good way of testing this.
My System SpecsSystem Spec
27 Sep 2014   #3
junqi89

windows 7 64bit
 
 

Quote   Quote: Originally Posted by Tookeri View Post
By folder I assume you mean Key. The /f parameter you use should overwrite any current value. Are you saying that doesn't work?

If you remove /f and a value already exist for a key, you'll be prompted if you want to overwrite the current value. That's a good way of testing this.
thank you very much
My System SpecsSystem Spec
.

Reply

 need help with command prompt command




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Command Prompt command <ipconfig> not working
when I open up my command prompt and type 'ipconfig' without the ' and press enter it returns the line: 'ipconfig' is nto recognized as an internal or external command, operable program, or batch file I am trying to find out the information I need in order to set up a static IP Address for port...
Network & Sharing
SSH command prompt
Is there any way I can use ssh or something similar to enter command line prompts from my Mac terminal, similar to SSH but windows commands? (From mac to a windows 7 desktop)
Performance & Maintenance
command prompt
Hi all i need you help me a thing :cry: I went to use autosave all text on command prompt (CMD), how can i do or use what command prompt cade for mark it autosave when i used command prompt. Example : Color 0a
General Discussion
Run administrative command prompt from command prompt
Ok So I got myself into a unique bind here. I was trying to install some custom system files (for a theme) and I did it wrong and now I cant open explorer.exe . I dont want to goto a backup because this is a easy fix. (in my view). So I need to know how to run command prompt with administrative...
General Discussion
Command Prompt
Ok so every time I try to open the command prompt using an external source (batch file, small c++ program i made to say Hi to me through the command prompt) it instantly closes. Does anyone have any idea why this is happening and if so how can I fix it? Thanks, Wave
General Discussion
command prompt bug ?
Hi, I just tryed to use cmd as usual but it seems that I can't explore an other HDD than C: It bugs me I don't understand why i'm the only user on my computer and I am admin on it I at home so it should work but when I type "cd d:" I get that : ...
General Discussion


Our Sites

Site Links

About Us

Find 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 14:10.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App