Scripting Homepage change in .cmd


Ad

Advertisements

clifford_cooley

VIP Member
Joined
Mar 8, 2009
Messages
5,063
Reaction score
1,185
Why use CMD?

Using a REG file would be just as easy.

IE_Main_Start_Page.reg
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Start Page"="http://www.google.com"
It's been a while since I have tried any reg commands from commandline. I think my last project was with XP. Here is an article that explains the command I was using at the time.

REG Command in Windows XP
REG.EXE does almost everything Regedt32 can do, but it allows you to do it from a command line. This can be useful when you want to quickly make a change without opening Regedt32, and it also allows you to embed registry operations in logon scripts and batch files.
Here is what you get from commandline help (REG /?).
Code:
REG Operation [Parameter List]

Operation  [ QUERY   | ADD    | DELETE  | COPY    |
             SAVE    | LOAD   | UNLOAD  | RESTORE |
             COMPARE | EXPORT | IMPORT  | FLAGS ]

Return Code: (Except for REG COMPARE)
   0 - Successful
   1 - Failed

For help on a specific operation type:
   REG Operation /?

Examples:
   REG QUERY /?
   REG ADD /?
   REG DELETE /?
   REG COPY /?
   REG SAVE /?
   REG RESTORE /?
   REG LOAD /?
   REG UNLOAD /?
   REG COMPARE /?
   REG EXPORT /?
   REG IMPORT /?
   REG FLAGS /?
 
Last edited:
Ad

Advertisements

Joined
Apr 19, 2012
Messages
3
Reaction score
0
Thanks for the info!

The reason that I want to run in CMD is because our help desk has a CMD script and I would like to embed it in there so they don't have a bunch of scripts lying around for rebuilding machines.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top