need to create a script that modifies a registry and then runs the application

i have an application published in citrix which requires that a registry entry be modifues in the users profile. this info in related to licensing of the software. so i created the following script and saved it as a .reg file. now the problem is this reg file should only run for people who use this application. so using logon scripts in not an option. is it possible that i create a batch file or a script and publish the script in citrix that will first modify the user profile and then start the application. the reg file is as follows and the application is a normal .exe application. for example c:\dameware\dm.exe

[HKEY_CURRENT_USER\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings]
"Reg Update"=dword:00000001
"Registered Name Update"="Your Registered User Name"
"Reg Number Update"="Your License Number"

i need a script that will make this modification to the users profile and then start the application. i am not a scripting guy and hope someone can help me with this
Who is Participating?
Shift-3Connect With a Mentor Commented:
If there are quotes around the program path then you have to put an extra set of quotes after the start command as a placeholder for the window title.

start "" "C:\Program Files\DameWare Development\DameWare NT Utilities\dwrcc.exe"

Open in new window

A simple batch script like the one below should work.

@echo off
regedit /s filename.reg
start "" c:\dameware\dm.exe

Open in new window

mgmohiuddinAuthor Commented:
i created a .reg file containing the required keys. these keys are for license registration. when a user wants to use this application this regfile registers the product in the users profile. then i created a batch file as follows

@echo off
regedit.exe /s c:\test.reg

"C:\Program Files\DameWare Development\DameWare NT Utilities\dwrcc.exe"

if i put start the exe is not running for some reason. it is working but  a command prompt is always open till i close the application. is there a war this command prompt is closed the moment the applicattion is opened
mgmohiuddinAuthor Commented:
thanks a lot, it is working. one last thing and i will close the question. i created a .cmd file that will add a few registry parameters and then launch the application. i published this .cmd file in citrix and when you launch this script it prompts,


if user selects RUN its working. i dont want this option to be dsiplayed. is there a way to avoid getting this dialog box
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.