<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; CMD/BAT: Как в самом  bat файле прописать его в планировщик заданий?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=8170&amp;type=atom" />
	<updated>2013-06-28T15:05:08Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=8170</id>
		<entry>
			<title type="html"><![CDATA[Re: CMD/BAT: Как в самом  bat файле прописать его в планировщик заданий?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=73365#p73365" />
			<content type="html"><![CDATA[<p>Почему бы просто не поместить в Автозагрузку?</p>]]></content>
			<author>
				<name><![CDATA[shiz]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26249</uri>
			</author>
			<updated>2013-06-28T15:05:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=73365#p73365</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[CMD/BAT: Как в самом  bat файле прописать его в планировщик заданий?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=70650#p70650" />
			<content type="html"><![CDATA[<p>Как в самом&nbsp; bat файле прописать его в планировщик заданий, чтобы при каждом входе в систему, удалялись следующие параметра и ветки реестра? Еще, можно как-то его укоротить. ОС Windows 7. <br /></p><div class="codebox"><pre><code>@echo off
reg delete &quot;HKCR\CLSID\{AB007EC8-E2D4-4664-ACD9-1D059681F3DE}&quot; /f
reg delete &quot;HKCU\Software\Classes\CLSID\{AB007EC8-E2D4-4664-ACD9-1D059681F3DE}&quot; /f
reg delete &quot;HKLM\SOFTWARE\Classes\CLSID\{AB007EC8-E2D4-4664-ACD9-1D059681F3DE}&quot; /f
reg delete &quot;HKLM\SOFTWARE\WilTEP1963&quot; /f

set Key1=HKCu\Software\WilTEP1963\WorkS
set Param1=Time
set Param2=SpInfoA12_2_1037
set Param3=SpInfoB12_2_1037
set Param4=Day
set Param5=Codes

For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key1%&quot;^|Find /I &quot;%Param1%&quot;`) do set var=%%A
if not defined var (echo Key %Param1% is not Exist) else (
  echo Key %Param1% is Exist
  REG DELETE &quot;%Key1%&quot; /v %Param1% /f &gt;nul
)
set var=
For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key1%&quot;^|Find /I &quot;%Param2%&quot;`) do set var=%%A
if not defined var (echo Key %Param2% is not Exist) else (
  echo Key %Param2% is Exist
  REG DELETE &quot;%Key1%&quot; /v %Param2% /f &gt;nul
)
set var=
For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key1%&quot;^|Find /I &quot;%Param3%&quot;`) do set var=%%A
if not defined var (echo Key %Param3% is not Exist) else (
  echo Key %Param3% is Exist
  REG DELETE &quot;%Key1%&quot; /v %Param3% /f &gt;nul
)
set var=
For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key1%&quot;^|Find /I &quot;%Param4%&quot;`) do set var=%%A
if not defined var (echo Key %Param4% is not Exist) else (
  echo Key %Param4% is Exist
  REG DELETE &quot;%Key1%&quot; /v %Param4% /f &gt;nul
)
set var=
For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key1%&quot;^|Find /I &quot;%Param5%&quot;`) do set var=%%A
if not defined var (echo Key %Param5% is not Exist) else (
  echo Key %Param5% is Exist
  REG DELETE &quot;%Key1%&quot; /v %Param5% /f &gt;nul
)

set Key2=HKCu\Software\WilTEP1963\NeARTS
set Param1=Day
set Param2=Time
set Param3=NrInfoA12_2_689
set Param4=NrInfoB12_2_689
set Param5=Codes

For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key2%&quot;^|Find /I &quot;%Param1%&quot;`) do set var=%%A
if not defined var (echo Key %Param1% is not Exist) else (
  echo Key %Param1% is Exist
  REG DELETE &quot;%Key2%&quot; /v %Param1% /f &gt;nul
)
set var=
For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key2%&quot;^|Find /I &quot;%Param2%&quot;`) do set var=%%A
if not defined var (echo Key %Param2% is not Exist) else (
  echo Key %Param2% is Exist
  REG DELETE &quot;%Key2%&quot; /v %Param2% /f &gt;nul
)
set var=
For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key2%&quot;^|Find /I &quot;%Param3%&quot;`) do set var=%%A
if not defined var (echo Key %Param3% is not Exist) else (
  echo Key %Param3% is Exist
  REG DELETE &quot;%Key2%&quot; /v %Param3% /f &gt;nul
)
set var=
For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key2%&quot;^|Find /I &quot;%Param4%&quot;`) do set var=%%A
if not defined var (echo Key %Param4% is not Exist) else (
  echo Key %Param4% is Exist
  REG DELETE &quot;%Key2%&quot; /v %Param4% /f &gt;nul
)
set var=
For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key2%&quot;^|Find /I &quot;%Param5%&quot;`) do set var=%%A
if not defined var (echo Key %Param5% is not Exist) else (
  echo Key %Param5% is Exist
  REG DELETE &quot;%Key2%&quot; /v %Param5% /f &gt;nul
)

set Key3=HKCu\Software\WilTEP1963\NeARTS\Backup
set Param1=Time

For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key3%&quot;^|Find /I &quot;%Param1%&quot;`) do set var=%%A
if not defined var (echo Key %Param1% is not Exist) else (
  echo Key %Param1% is Exist
  REG DELETE &quot;%Key3%&quot; /v %Param1% /f &gt;nul
)

set Key4=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion
set Param1=ProductID12_2_689
set Param2=DLLVersion12_2_689

For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key4%&quot;^|Find /I &quot;%Param1%&quot;`) do set var=%%A
if not defined var (echo Key %Param1% is not Exist) else (
  echo Key %Param1% is Exist
  REG DELETE &quot;%Key4%&quot; /v %Param1% /f &gt;nul
)
set var=
For /F &quot;UseBackQ Tokens=1*&quot; %%A In (`Reg.exe Query &quot;%Key4%&quot;^|Find /I &quot;%Param2%&quot;`) do set var=%%A
if not defined var (echo Key %Param2% is not Exist) else (
  echo Key %Param2% is Exist
  REG DELETE &quot;%Key4%&quot; /v %Param2% /f &gt;nul
)
Exit</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Ремер]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27916</uri>
			</author>
			<updated>2013-03-22T16:22:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=70650#p70650</id>
		</entry>
</feed>
