?
Solved

Need a script to modify the registry

Posted on 2011-03-07
1
Medium Priority
?
282 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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
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…
Suggested Courses

801 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