Solved

How to use a batch file to automatically configure LAN and email account

Posted on 2004-08-11
8
557 Views
Last Modified: 2010-04-14
Im trying to make it easier to set up computers on our network using a batch file login script.  I was wondering if anyone knows how to use a batch script to automatically, after logging in to the network, connect to the internet via a LAN connection and configue email settings for IE and Outlook?  Im running windows 2000.  If you could be as specific and clear as possible that would be great, im new in the batch scripting world.  Thanks.

Dave
0
Comment
Question by:dlev15
  • 4
  • 2
  • 2
8 Comments
 
LVL 25

Expert Comment

by:mikeleebrla
ID: 11774999
i dont know how to do it with a batch file,,, but i do this exact same thing by setting up  a profile...then copying this profile to the Default User profile,,, this works fine for me
0
 

Author Comment

by:dlev15
ID: 11775603
i really need to know how to do it in a batch file, if possible...thanks though
0
 
LVL 6

Expert Comment

by:tanelorn
ID: 11775825
hi,

the way that I do it is to export the following keys into a reg file. and import it into the new machine. these 2 keys contain a number of settings in each one.  

[HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\user@whatever.com]
[HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\user@whatever.com]

you can put it into a batch file by calling regedit if that buys you anything.

I'm not sure if you are transitioning machines (ie one shot deal) for people or want  a roaming type of setup..  
if you are looking for a roaming type of solution, I would recommend a roaming profile.

Tanelorn
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:dlev15
ID: 11776008
Tanelorn,


Not exactly familiar with .reg files, so im kind of lost with your solution.
0
 
LVL 25

Expert Comment

by:mikeleebrla
ID: 11776032
reg files basically are text files,, renamed with the reg extension,,, when run, they edit keys in the registry... copy and past the text in a text file,, save it,, rename it w/ a reg extension
0
 

Author Comment

by:dlev15
ID: 11776087
OK...now how do i call the .reg file from a batch file?  Sorry i have so many questions about this, ive never really done it before.
0
 
LVL 6

Accepted Solution

by:
tanelorn earned 500 total points
ID: 11776170
hi,  

if you are familiar with the registry,  navigate (hilight) to the first key I've indicated,

then click on "Registry" menu item (top left)  then click on  "Export registry file"

the dialog will open asking where to put the file.

save it to the desktop, or where ever.  call it  ieacct.reg

then do the same for the second one.  call it   outlook.reg

your batch file will have syntax something like this

but,  you could just double click on the reg files and they will install


----snip----
your code....

call regedit -s \\server\share\folder\ieacct.reg
call regedit -s \\server\share\folder\outlook.reg

the rest of your code

---snip----

if you want to make only one file.  copy and paste the contents of one into the other  but only have one
"REGEDIT4"  at the top.

you'll see them if you open the reg file with your favorite text editor

Tanelorn
0
 

Author Comment

by:dlev15
ID: 11776346
Thanks man...how do i get you your points?
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question