Hi Group

I need very urgent help from this group. I have written a VB script code
like this,
----------------------------------------------------------------------------------------------------
dim wshshell
Set WshShell = Wscript.CreateObject("WScript.Shell")

WshShell.RegWrite
"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel",
"00000001", "REG_DWORD"

Dim cmd
Dim I
I=1
cmd = "control.exe"

while I<1
I=I+1
wend

WshShell.Run cmd,,True

WshShell.AppActivate "Control Panel"
WshShell.SendKeys "%F"
WshShell.SendKeys "%F"
WshShell.SendKeys "C"

WshShell.RegDelete
"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel"
---------------------------------------------------------------------------------------

This code is working fine.
Now I need the same function execution through batch files.
I dont know how to write the same function in batch file.
Can anyone help me for this.I know this is not a Group for answering batch
file question, then also if anyone give me the solution, i will be highly
thankful to them.

steps are
* Adding the registry key.
* opening the conntrol panel window
* closing the control panel window
* delete the same key

Thanks and Best Regards
Katheryne

Re: Code for Batch files. by Dave

Dave
Sat Aug 20 17:22:26 CDT 2005

Possibly use reg.exe. reg /? for the syntax

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Katheryne" wrote
| Hi Group
|
| I need very urgent help from this group. I have written a VB script code
| like this,
| ----------------------------------------------------------------------------------------------------
| dim wshshell
| Set WshShell = Wscript.CreateObject("WScript.Shell")
|
| WshShell.RegWrite
|
"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel",
| "00000001", "REG_DWORD"
|
| Dim cmd
| Dim I
| I=1
| cmd = "control.exe"
|
| while I<1
| I=I+1
| wend
|
| WshShell.Run cmd,,True
|
| WshShell.AppActivate "Control Panel"
| WshShell.SendKeys "%F"
| WshShell.SendKeys "%F"
| WshShell.SendKeys "C"
|
| WshShell.RegDelete
|
"HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel"
| ---------------------------------------------------------------------------------------
|
| This code is working fine.
| Now I need the same function execution through batch files.
| I dont know how to write the same function in batch file.
| Can anyone help me for this.I know this is not a Group for answering batch
| file question, then also if anyone give me the solution, i will be highly
| thankful to them.
|
| steps are
| * Adding the registry key.
| * opening the conntrol panel window
| * closing the control panel window
| * delete the same key
|
| Thanks and Best Regards
| Katheryne
|
|



Re: Code for Batch files. by Katheryne

Katheryne
Sat Aug 20 18:10:13 CDT 2005

Thanks Dave

Can i knoe the command to close the control Panel window through batch file.

thanks Kathy


"Dave Patrick" <DSPatrick@nOsPAM.gmail.com> wrote in message
news:uvI7lWdpFHA.708@TK2MSFTNGP09.phx.gbl...
> Possibly use reg.exe. reg /? for the syntax
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "Katheryne" wrote
> | Hi Group
> |
> | I need very urgent help from this group. I have written a VB script code
> | like this,
> | ----------------------------------------------------------------------------------------------------
> | dim wshshell
> | Set WshShell = Wscript.CreateObject("WScript.Shell")
> |
> | WshShell.RegWrite
> |
> "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel",
> | "00000001", "REG_DWORD"
> |
> | Dim cmd
> | Dim I
> | I=1
> | cmd = "control.exe"
> |
> | while I<1
> | I=I+1
> | wend
> |
> | WshShell.Run cmd,,True
> |
> | WshShell.AppActivate "Control Panel"
> | WshShell.SendKeys "%F"
> | WshShell.SendKeys "%F"
> | WshShell.SendKeys "C"
> |
> | WshShell.RegDelete
> |
> "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ForceClassicControlPanel"
> | ---------------------------------------------------------------------------------------
> |
> | This code is working fine.
> | Now I need the same function execution through batch files.
> | I dont know how to write the same function in batch file.
> | Can anyone help me for this.I know this is not a Group for answering
> batch
> | file question, then also if anyone give me the solution, i will be
> highly
> | thankful to them.
> |
> | steps are
> | * Adding the registry key.
> | * opening the conntrol panel window
> | * closing the control panel window
> | * delete the same key
> |
> | Thanks and Best Regards
> | Katheryne
> |
> |
>
>



Re: Code for Batch files. by Dave

Dave
Sat Aug 20 18:19:28 CDT 2005

Why are you opening it?

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Katheryne" wrote:
| Thanks Dave
|
| Can i knoe the command to close the control Panel window through batch
file.
|
| thanks Kathy



Re: Code for Batch files. by Katheryne

Katheryne
Mon Aug 22 00:01:13 CDT 2005

Hi Patrick
My requirement is

1) add a regeistry file.
2) then open the control panel wiondow.
3) Close the control panel window
4) then delete the same registry.

I got the command for 1st , 2nd and 4th, but i am not getting the command to
close the "Control Panel" through batch file.

Can you help me .

thanks and Regards
Kathy


"Dave Patrick" <DSPatrick@nOsPAM.gmail.com> wrote in message
news:uPIpd2dpFHA.616@TK2MSFTNGP15.phx.gbl...
> Why are you opening it?
>
> --
> Regards,
>
> Dave Patrick ....Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
>
> "Katheryne" wrote:
> | Thanks Dave
> |
> | Can i knoe the command to close the control Panel window through batch
> file.
> |
> | thanks Kathy
>
>