# [SOLVED] Batch File to Change registry



## bremner (Jun 5, 2008)

Hi,

I know that a similar post has been posted before but i am looking for the "for dummies" version. A simple notepad script for xp pro to change HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\O utlook\Security
C:\Documents and Settings\mbremner\Local Settings\Temporary Internet Files\OLK127\

to

C:\Documents and Settings\mbremner\Local Settings\Temp\OLK127\

It is to allow a program called Iaanywhere to send pdf files to outlook 

Any help would really be appreciated


----------



## ThorXP (Mar 11, 2008)

*Re: Batch File to Change registry*

First thing is you mis-spelled iaanywhere it is actually iAnywhere and from what I can find is a security type program shown here:

http://en.wikipedia.org/wiki/Ianywhere

Since this has to do with security I would suggest to try to find a solution to this by some other means than trying to modify the registry by use of a batch file and help with this here might be against the forum rules.

I will ask a manager to take a look see at the rules pertaining to this program and let him/her make the decision.


----------



## chauffeur2 (Feb 7, 2006)

*Re: Batch File to Change registry*

Hello bremner,

*ThorXP* is quite correct with his assumption.
This request is rather dubious to say the least; therefore, erring on the side of caution, this thread is now CLOSED.

Please refer to *The TSF Rules*. (_click the coloured link._)

Thank You.

*EDIT:* bremner you are quite correct this program is used by insurance companies, and is quite legitimate.
Our sincerest apologies for the misunderstanding.
Unfortunately we do not know how this program operates, as it is not generally used by home PC Users. :wave:


----------



## justpassingby (Mar 11, 2007)

*Re: Batch File to Change registry*

Please don't double post, since this thread has been reopened I binned your other one.

Give us more information : *HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security* is the location of the key you want to change but what's the name of that key that contains the data *C:\Documents and Settings\mbremner\Local Settings\Temporary Internet Files\OLK127\* ?

If you only need to change it on one computer (since the location contains your user name) why don't you edit the registry directly ? It'll take 5 seconds : start => run => type regedit => navigate to the key => double-click it and change the value. Right-click => export the location of the key first if you think you could do an error.

As ThorXP said the program is called iAnywhere and not Iaanywhere.


----------



## bremner (Jun 5, 2008)

*Re: Batch File to Change registry*

sorry for reposting but with the problems i have had with this post i didnt think anybody would post an answer because of the post already recieved. No the program is call iaAnywhere to be exact(already clarified with chauffer2) it is not the sysbase program you are thinking of it is an insurance program http://www.iaanyware.net/. I have been advised to make the registry change by their help desk the reason I dont want to change it manually is that I have done this many times and it always reverts back eventually. I simply want to put a batch file in startup so every time the computer restarts itchanges the registry entry. sorry for the mis information HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security - OutlookSecureTempFolder currently reads C:\Documents and Settings\mbremner\Local Settings\*Temporary Internet Files*\OLK127\ i want to change it to C:\Documents and Settings\mbremner\Local Settings\*temp*\OLK127\
Your help would really be appreciated


----------



## justpassingby (Mar 11, 2007)

*Re: Batch File to Change registry*

Use the reg command :
http://technet.microsoft.com/en-us/library/bb490984(TechNet.10).aspx

*reg add HKCU\Software\Microsoft\Office\11.0\Outlook\Security /v OutlookSecureTempFolder /t REG_SZ /d "C:\Documents and Settings\mbremner\Local Settings\temp\OLK127" /f*

Check that the OutlookSecureTempFolder entry contains a REG_SZ value.

Your program is called iaAnyware, not iaAnywhere :wink:


----------



## af3 (Jun 18, 2008)

*Re: Batch File to Change registry*

One could make a .reg file and a .cmd file used to silently merge the .reg file into the registry.

Example:
@regedit /s regfile.reg


----------



## justpassingby (Mar 11, 2007)

*Re: Batch File to Change registry*

Yup, but the instruction in post #6 in a .bat file should do the same without the need of an external .reg file.


----------



## af3 (Jun 18, 2008)

*Re: Batch File to Change registry*

Yes, that simplifies the solution, but if one needed to merge quite a few keys, it would be faster to export then make a simple .cmd which merges the exported .reg

I was shooting for a faster solution. Since it's a one-liner it would be nice to have it all-in-one.

I made a bunch of one-click installers for a bunch of freeware utilities I use. I used WinRAR to execute an installer silently and then in the next execute line, I silently merge a .reg with my custom settings into the registry. The end result is one compressed .exe that assists in making a restore a little faster...


----------



## bremner (Jun 5, 2008)

*Re: Batch File to Change registry*

thanks guys i will let you know how it goes


----------



## justpassingby (Mar 11, 2007)

*Re: Batch File to Change registry*

@ af3 : very good point.

@ bremner : ok, we'll stick around.


----------



## bremner (Jun 5, 2008)

*Re: Batch File to Change registry*

Hi guys unfortunately the script doesnt work, it comes up with an error: binary files can only be imported while regedit is open (something Similar) any other ideas?


----------



## justpassingby (Mar 11, 2007)

*Re: Batch File to Change registry*

What method did you use ?

reg add HKCU\Software\Microsoft\Office\11.0\Outlook\Security /v OutlookSecureTempFolder /t REG_SZ /d "C:\Documents and Settings\mbremner\Local Settings\temp\OLK127" /f

works fine on my XP Home installation even when regedit is not open.


----------



## bremner (Jun 5, 2008)

*Re: Batch File to Change registry*

i placed reg add HKCU\Software\Microsoft\Office\11.0\Outlook\Security /v OutlookSecureTempFolder /t REG_SZ /d "C:\Documents and Settings\mbremner\Local Settings\temp\OLK127" /f in notepad and saved as a batch file which just kept scrolling through in the command prompt but did not change the entry so i tried as a reg file linking it to a batch file and thats when it came up with the binary error


----------



## justpassingby (Mar 11, 2007)

*Re: Batch File to Change registry*

I created the .bat file, saved it on the hard drive, drag'n'dropped it to start => all programs => startup (it'll create a shortcut to the .bat file, you'll need to keep the original .bat file in the location where you saved it first) and it works like a charm. There was no OutlookSecureTempFolder value in my registry, logged off, logged in, the dos command prompt appeared at the screen for half a sec and the entry was added correctly in the registry.

I attached the .bat file for you, unzip it somewhere then drag'n'drop it to the startup menu.

Make sure you have no security program reverting the changes to the registry after the batch file runs. Could also be outlook that recreates the value each time you run it. Try running the batch file manually then check the registry before and after you run the batch file and before and after you run outlook.


----------



## bremner (Jun 5, 2008)

*Re: Batch File to Change registry*

Hi Justpassingby, It did indeed work like a charm the problem was I was trying to test it by executing it manually but when you put it in startup it works great. Thankyou for all of your help it really is appreciated.


----------

