?
Solved

Need a script to modify the registry

Posted on 2011-03-07
1
Medium Priority
?
283 Views
Last Modified: 2012-05-11
Hi,

I need a script to create the below value for the following key: HKEY_LOCAL_MACHINE\SOFTWARE\CITRIX\RADE

value: AppHubWhitelist
Type: REG_SZ

and also add the following to the Registry Value:

<server name>;<Server IP>


Thank you
0
Comment
Question by:Icarious
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
RussPitcher earned 2000 total points
ID: 35056255
The simplest option is to use the REG utility (already available in Windows) with a simple batch file.

REG ADD HKLM\SOFTWARE\CITRIX\RADE /v AppHubWhitelist /t REG_SZ /d "<server name>;<Server IP>"

If you're after the local servername and IPaddress then use the attached batch file
@echo off

REM Quick clean up from any previous attempts
del %temp%\IP.txt /f /q
set TEMPSTRING=

REM Get the local IP addresses and place them in a file
ipconfig | find "IP Address" > %temp%\IP.txt

REM Parse the file and extract the IP address
for /f "tokens=2 delims=:" %%i in ('type %temp%\IP.txt') DO call :add %%i

REM Run REG.exe to add the registry value
REG ADD HKLM\SOFTWARE\CITRIX\RADE /v AppHubWhitelist /t REG_SZ /d "%COMPUTERNAME%%TEMPSTRING%"

REM Clean up after ourselves
del %temp%\IP.txt /f /q
set TEMPSTRING=
goto :EOF

:add
set TEMPSTRING=%TEMPSTRING%;%1

:EOF
REM That's All!

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Six Sigma Control Plans

649 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