[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2008-11-17
4
Medium Priority
?
223 Views
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
0
Comment
Question by:mgmohiuddin
  • 2
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Shift-3
ID: 22978293
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

0
 

Author Comment

by:mgmohiuddin
ID: 22978901
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
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 2000 total points
ID: 22979045
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

0
 

Author Comment

by:mgmohiuddin
ID: 22982800
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
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month18 days, 14 hours left to enroll

834 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