Hi again.
How can I check if there is a reg key before running a command?
for example, I want to run this command:
but before running it, I want to make sure that this registry key exists. how can I add "if" to this command?
I have many "reg" commands in my script after each other.
another command is:
How can I make sure this service is available and then run this command?
have many "sc" commands in my script too.
Thanks.
How can I check if there is a reg key before running a command?
for example, I want to run this command:
Batch:
REG Add "HKLM\SYSTEM\CurrentControlSet\Control\CrashControl" /V "CrashDumpEnabled" /T "REG_DWORD" /D "0" /F
I have many "reg" commands in my script after each other.
another command is:
Batch:
SC Config "AJRouter" Start=Disabled
have many "sc" commands in my script too.
Thanks.
My Computers
System One System Two
-
- OS
- Windows 11 Pro 24H2
- Computer type
- Laptop
- Manufacturer/Model
- Huawei MateBook D15
- CPU
- Ryzen 5 3500U
- Memory
- 8GB
- Graphics Card(s)
- Vega 8
- Screen Resolution
- FHD
- Hard Drives
- 256GB Samsung SSD + 1TB HDD
- Browser
- Microsoft Edge
- Antivirus
- ESET Smart Security Premium
-
- Operating System
- Windows 10 Enterprise LTSC 21H2
- Computer type
- Laptop
- Manufacturer/Model
- MSI GS73 6RF Stealth Pro
- CPU
- intel core i7 6700HQ
- Memory
- 16GB
- Graphics card(s)
- Nvidia Geforce GTX1060 (6GB)
- Screen Resolution
- FHD
- Hard Drives
- 128GB SSD + 1TB HDD
- Browser
- Microsoft Edge
- Antivirus
- Windows Defender