Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Reading values from .ini and writing to registry


  • Please log in to reply

#1
Alex Hil

Alex Hil

    Member

  • Member
  • PipPip
  • 12 posts
I am hoping someone can help me on this one.

I am new to batch file programming and need a way to read values from an .ini file and write them into the registry (or just to a .reg file). This should be excecuted on login, so I am hoping to include it in my logonscr.bat file.

Any help is greatly appreciated.

Alex
  • 0

Advertisements


#2
Neil Jones

Neil Jones

    Member 5k

  • Member
  • PipPipPipPipPipPipPipPip
  • 8,476 posts
What exactly are you trying to do?
  • 0

#3
Alex Hil

Alex Hil

    Member

  • Topic Starter
  • Member
  • PipPip
  • 12 posts
My users have their email settings in an .ini file in their home drives. Roaming profiles wont work because the powers that be wont let me access them (I work for a government department). I recently RIS'd all my machines to get rid of all the crap on them, but in doing so removed all the staff email addresses. I was hoping that I could set them up again from a login script which I could either remove after a week or so, or keep to set up email on each new computer they log in to.

The file looks like so:
[Email Settings]
Name=Firstname Surname
Address=email@email.com
Incoming Server=server.mydomain
Outgoing Server=server.mydomain
  • 0

#4
hfcg

hfcg

    The hippie freak computer geek

  • Member
  • PipPipPipPipPip
  • 2,496 posts
Are you the system Administrator?
Do you have the necessary permissions to do this?
  • 0

#5
Alex Hil

Alex Hil

    Member

  • Topic Starter
  • Member
  • PipPip
  • 12 posts
I am the system admin, and can do everything with logon scripts, but no users show up in AD - the department uses a custom script/program to manage users which doesnt have anything to do with roaming profiles on there. I can change anything on the server, but it is monitored by the dept and they dont me playing with AD or their GPOs etc.

Alex
  • 0

#6
hfcg

hfcg

    The hippie freak computer geek

  • Member
  • PipPipPipPipPip
  • 2,496 posts
I am sorry. Our terms of use, that you agreed to, prohibit us from helping you.
  • 0

#7
Alex Hil

Alex Hil

    Member

  • Topic Starter
  • Member
  • PipPip
  • 12 posts
We offer free computer help and tech support for home and personal use. We are not here to support others that work for profit, or to support/replace your company's IT department.

By system admin, I am a computer teacher for primary school children and have an administrator login. I hardly think that I work for profit (I teach for profit, not fix the computers). I am the entire IT department, and when my role is to teach IT, and not fix it that is saying something. I dont think my situation really fits into that condition, but if you believe otherwise then fair enough, I will leave it alone.
  • 0

#8
hfcg

hfcg

    The hippie freak computer geek

  • Member
  • PipPipPipPipPip
  • 2,496 posts
I am not trying to be mean.
If you feel that I am in error, please PM an Administrator at this site.
  • 0

#9
wannabe1

wannabe1

    Tech Staff

  • Technician
  • 16,645 posts
Hello Alex Hil...welcome to Geeks to Go!

I see no problems here....please feel free to continue helping.

wannabe1
  • 0

#10
Alex Hil

Alex Hil

    Member

  • Topic Starter
  • Member
  • PipPip
  • 12 posts
Thank you wannabe1...

Edited by Alex Hil, 20 February 2008 - 06:32 PM.

  • 0

#11
hfcg

hfcg

    The hippie freak computer geek

  • Member
  • PipPipPipPipPip
  • 2,496 posts
Hello,
Are you looking for a program to do this for you?
I believe that you can do this with a macro
Please go here and let me know if this is along the lines of what you mean.

Edited by hfcg, 20 February 2008 - 07:04 PM.

  • 0

#12
Alex Hil

Alex Hil

    Member

  • Topic Starter
  • Member
  • PipPip
  • 12 posts
After a bit more research I have found this link: http://www.codecomme...sage431829.html

I will use a VBScript file to read the info and write to the registry and call it from the batch file. I think thats the easiest way.

Thanks for your link.
  • 0

#13
hfcg

hfcg

    The hippie freak computer geek

  • Member
  • PipPipPipPipPip
  • 2,496 posts
OK, In case that does not work for you, you may consider Microsoft Macro assembler.
  • 0

#14
hfcg

hfcg

    The hippie freak computer geek

  • Member
  • PipPipPipPipPip
  • 2,496 posts
Here is an article on Microsoft Macro assembler.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP