Reg uzantılı dosyayı Bat uzantılı dosya olarak yazma.

PC hakkındaki genel bilgi ve ipucu paylaşım alanıdır.
Cevapla
Kullanıcı avatarı
Mendenn
Gigabyte2
Gigabyte2
Mesajlar: 2356
Kayıt: 19 Haz 2006, 18:01
cinsiyet: Erkek
İletişim:

Reg uzantılı dosyayı Bat uzantılı dosya olarak yazma.

Mesaj gönderen Mendenn » 18 Ara 2010, 20:30

The examples shown here are just that - they are to show conversion equivalents and are not designed to carry out any specific function.

All examples are located in the following key:

HKEY_CURRENT_USER\Test (.reg file) or HKCU\Test (.bat file)

Actual files will pertain to different sections of the registry, and the equivalent handles (roots) are as follows (.reg file > .bat file):

HKEY_CLASSES_ROOT > HKCR (administrative privileges required)
HKEY_CURRENT_USER > HKCU
HKEY_LOCAL_MACHINE > HKLM (administrative privileges required)
HKEY_USERS > HKU
HKEY_CURRENT_CONFIG > HKCC


The vast majority of registry edits will pertain to one or more of the first three roots listed above.

The primary commands used will be REG ADD and REG DELETE (see below for examples of the syntax).

Code:

Kod: Tümünü seç

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Windows\system32>reg add /?
REG ADD KeyName [/v ValueName | /ve] [/t Type] [/s Separator] [/d Data] [/f]
  KeyName  [\\Machine\]FullKey
           Machine  Name of remote machine - omitting defaults to the
                    current machine. Only HKLM and HKU are available on remote
                    machines.
           FullKey  ROOTKEY\SubKey
           ROOTKEY  [ HKLM | HKCU | HKCR | HKU | HKCC ]
           SubKey   The full name of a registry key under the selected ROOTKEY.
  /v       The value name, under the selected Key, to add.
  /ve      adds an empty value name (Default) for the key.
  /t       RegKey data types
           [ REG_SZ    | REG_MULTI_SZ | REG_EXPAND_SZ |
             REG_DWORD | REG_QWORD    | REG_BINARY    | REG_NONE ]
           If omitted, REG_SZ is assumed.
  /s       Specify one character that you use as the separator in your data
           string for REG_MULTI_SZ. If omitted, use "\0" as the separator.
  /d       The data to assign to the registry ValueName being added.
  /f       Force overwriting the existing registry entry without prompt.
Examples:
  REG ADD \\ABC\HKLM\Software\MyCo

    Adds a key HKLM\Software\MyCo on remote machine ABC
  REG ADD HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead
    Adds a value (name: Data, type: REG_BINARY, data: fe340ead)
  REG ADD HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax\0mail
    Adds a value (name: MRU, type: REG_MULTI_SZ, data: fax\0mail\0\0)
  REG ADD HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d ^%systemroot^%
    Adds a value (name: Path, type: REG_EXPAND_SZ, data: %systemroot%)
    Notice:  Use the caret symbol ( ^ ) inside the expand string
C:\Windows\system32>
Code:

Kod: Tümünü seç

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Windows\system32>reg delete /?
REG DELETE KeyName [/v ValueName | /ve | /va] [/f]
  KeyName    [\\Machine\]FullKey
    Machine  Name of remote machine - omitting defaults to the current machine.
             Only HKLM and HKU are available on remote machines.
    FullKey  ROOTKEY\SubKey
    ROOTKEY  [ HKLM | HKCU | HKCR | HKU | HKCC ]
    SubKey   The full name of a registry key under the selected ROOTKEY.
  ValueName  The value name, under the selected Key, to delete.
             When omitted, all subkeys and values under the Key are deleted.
  /ve        delete the value of empty value name (Default).
  /va        delete all values under this key.
  /f         Forces the deletion without prompt.
Examples:
  REG DELETE HKLM\Software\MyCo\MyApp\Timeout
    Deletes the registry key Timeout and its all subkeys and values
  REG DELETE \\ZODIAC\HKLM\Software\MyCo /v MTU
    Deletes the registry value MTU under MyCo on ZODIAC
C:\Windows\system32>



This shows how to enter an empty value name (Default) for the key. Note that this CANNOT be deleted without deleting the parent key.

Code:

Kod: Tümünü seç

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Test]
@=""
Code:

Kod: Tümünü seç

@ECHO OFF
REG ADD "HKCU\Test" /ve /f
Resim


This shows a Default variable with data.

Code:

Kod: Tümünü seç

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Test]
@="Some data"
Code:

Kod: Tümünü seç

@ECHO OFF
REG ADD "HKCU\Test" /ve /t REG_SZ /d "Some data" /f


Resim

This shows a DWORD (4 byte, 32-bit) variable and data.

Code:

Kod: Tümünü seç

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Test]
"Variable"=dword:f09a0fa9
Code:

Kod: Tümünü seç

@ECHO OFF
REG ADD "HKCU\Test" /v "Variable" /t REG_DWORD /d "f09a0fa9" /f


Resim


This shows a QWORD (8 byte, 64-bit) variable and data.

Code:

Kod: Tümünü seç

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Test]
"Variable"=qword:fedcba9876543210
Code:

Kod: Tümünü seç

@ECHO OFF
REG ADD "HKCU\Test" /v "Variable" /t REG_QWORD /d "fedcba9876543210" /f


Resim


Finally, let's take a look at some real-life cases. Again, these will show the .reg file first followed by its .bat equivalent.


Code:

Kod: Tümünü seç

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\exefile\shell\Run with Normal Priority]
@=""

[HKEY_CLASSES_ROOT\exefile\shell\Run with Normal Priority\Command]
@="cmd.exe /c start \"Run with Normal Priority\" /Normal \"%1\""
Code:

Kod: Tümünü seç

@ECHO OFF
REG ADD "HKCR\exefile\shell\Run with Above Normal Priority" /ve /f
REG ADD "HKCR\exefile\shell\Run with Above Normal Priority\Command" /ve /t REG_SZ /d "cmd.exe /c start \"Run with Above Normal Priority\" /AboveNormal \"%%1\"" /f
The "E-mail" command is missing or is unavailable in Excel 2007, in PowerPoint 2007, or in Word 2007

Code:

Kod: Tümünü seç

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Messaging Subsystem]

"MAPI"="1"
"CMC"="1"
"CMCDLLNAME"="Mapi.dll"
"CMCDLLNAME32"="Mapi32.dll"
"MAPIX"="1"

"MAPIXVER"="1.0.0.1"
"OLEMessaging"="1"
Code:

Kod: Tümünü seç

@ECHO OFF
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem" /v MAPI /t REG_SZ /d 1 /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem" /v CMC /t REG_SZ /d 1 /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem" /v CMCDLLNAME t/ REG_SZ /d Mapi.dll /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem" /v CMCDLLNAME32 /t REG_SZ /d Mapi32.dll /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem" /v MAPIX /t REG_SZ /d 1 /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem" /v MAPIXVER /t REG_SZ /d 1.0.0.1 /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Messaging Subsystem" /v OLEMessaging /t REG_SZ /d 1 /f



Code:

Kod: Tümünü seç

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{[color=red]29ec048a[/color]-[color=red]cb02[/color]-[color=red]4173[/color]-[color=red]8d20[/color]-[color=red]bae131a470b9[/color]}\FxProperties]

"{69203b66-c559-499c-bb5f-f54563cd7d59},n"="<user preset name >"
"{36033203-cbc4-4960-9b48-490166ca34c9},n"=hex:[color=red]41[/color],[color=red]00[/color],[color=red]7f[/color],[color=red]fb[/color],[color=red]01[/color],[color=red]00[/color],[color=red]00[/color],[color=red]00[/color],00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{[color=red]b69efb25[/color]-[color=red]5ac5[/color]-[color=red]4f32[/color]-[color=red]819e[/color]-[color=red]efbc8ba37d42[/color]}\FxProperties]

"{69203b66-c559-499c-bb5f-f54563cd7d59},n"="<user preset name >"
"{36033203-cbc4-4960-9b48-490166ca34c9},n"=hex:[color=red]41[/color],[color=red]00[/color],[color=red]7f[/color],[color=red]fb[/color],[color=red]01[/color],[color=red]00[/color],[color=red]00[/color],[color=red]00[/color],00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
  00,00,00,00,00,00,00,00,00,00,00,00,00
Code:

Kod: Tümünü seç

@ECHO OFF
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{[color=red]29ec048a-cb02-4173-8d20-bae131a470b9[/color]}\FxProperties" /v "{69203b66-c559-499c-bb5f-f54563cd7d59},n" /t REG_SZ /d "<user preset name >" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{[color=red]29ec048a-cb02-4173-8d20-bae131a470b9[/color]}\FxProperties" /v "{36033203-cbc4-4960-9b48-490166ca34c9},n" /t REG_BINARY /d "[color=red]41007ffb01000000[/color]00000000000000000000000000000000000000000000000000000000000000000000000000000000" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{[color=red]b69efb25-5ac5-4f32-819e-efbc8ba37d42[/color]}\FxProperties" /v "{69203b66-c559-499c-bb5f-f54563cd7d59},n" /t REG_SZ /d "<user preset name >" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\{[color=red]b69efb25-5ac5-4f32-819e-efbc8ba37d42[/color]}\FxProperties" /v "{36033203-cbc4-4960-9b48-490166ca34c9},n" /t REG_BINARY /d "[color=red]41007ffb01000000[/color]00000000000000000000000000000000000000000000000000000000000000000000000000000000" /f




Etiket Bulutu:
Convert .reg files to .bat files
regtobat
regisrty kaydını nasıl bat dosyası olarak yazarım?
RegistrytoBAT
How to Convert Registry Files to Bat Files

Beni bir tek sen anladın ama sende yanlış anladın be gülüm..!



Kullanıcı avatarı
Mendenn
Gigabyte2
Gigabyte2
Mesajlar: 2356
Kayıt: 19 Haz 2006, 18:01
cinsiyet: Erkek
İletişim:

Re: Reg uzantılı dosyayı Bat uzantılı dosya olarak yazma.

Mesaj gönderen Mendenn » 18 Ara 2010, 20:41

Reg2BatConverter ile Windows Registry (.reg) dosyalarını Batch (.bat) dosyasına
çevirebilirsiniz.

Resim

Kurulum:
Reg2BatConverter.exer dosyasını istediğiniz bir yerede açınız.

Kullanımı:
Reg2BatConverter.exe bulunduğu klasöre Batch (.bat) dosyasına çevirmek istediğniz
Registry (.reg) dosyalarını atınız. Reg2BatConverter.exe dosyasını çalıştırın,
devamında klasörde Converted.bat dosyası oluşacaktır.

Önemli Açıklama:

Registry ve batch dosyaları windows sistem dosyaları ile alakalı olduğundan bu
programın kullanımın bütün sorumluluğu kullanıcıya aittir.

Kod: Tümünü seç

http://hotfile.com/dl/90327252/3966046/Reg2BatConverter.exe.html
Yazan:Mendenn
Beni bir tek sen anladın ama sende yanlış anladın be gülüm..!

Kullanıcı avatarı
velociraptor
Yottabyte3
Yottabyte3
Mesajlar: 28799
Kayıt: 14 Mar 2006, 02:33
cinsiyet: Erkek

Re: Reg uzantılı dosyayı Bat uzantılı dosya olarak yazma.

Mesaj gönderen velociraptor » 19 Ara 2010, 02:14

tesekürler lakin son verdigin cevirici hatali kodlar olusturuyor yani Güvenilmez ne yazikki
Knowledge determines destiny, And ye shall know the Truth and the Truth shall make you free

Cevapla