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

Posted on 2008-11-17
Last Modified: 2012-05-05
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
Question by:mgmohiuddin
    LVL 38

    Expert Comment

    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


    Author Comment

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

    Accepted Solution

    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


    Author Comment

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
    Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now