Link to home
Start Free TrialLog in
Avatar of mgmohiuddin
mgmohiuddin

asked on

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
Avatar of Shift-3
Shift-3
Flag of United States of America image

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

Avatar of mgmohiuddin
mgmohiuddin

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Shift-3
Shift-3
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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,

RUN---Save---cancel

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