Need a script to modify the registry

Posted on 2011-03-07
Last Modified: 2012-05-11

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
Question by:Icarious
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

Accepted Solution

RussPitcher earned 500 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

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

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


REM That's All!

Open in new window


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

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

733 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