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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.