need to run a script when the user opens a application

i have an application published in citrix presentation server 4.0. this application requires a registry file (.reg) file run when the user opens the application. this regfile has license registration information as this info is stored in the users profile. is there a way i could run this file atleast once when the user opens this published application. this application is published on one of the servers in the farm and not all users use this application. so putting this in login script may be too much and. only some 25 users have access to this application and this reg file needs to be run only for these users
mgmohiuddinAsked:
Who is Participating?
 
exx1976Connect With a Mentor Commented:
That batch version would do the trick, however it would continually make the same registry entry, rather than checking for it's existence.

Either way, it should work.   If you want a VBS version, let me know and I whip one up for ya.

-exx
0
 
sirbountyCommented:
Are you sure the registry change can take place once the app has already launched?
0
 
exx1976Commented:
Simple.  Publish a script that checks for the registry entry, makes the change if required, and then the script launches the app.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
mgmohiuddinAuthor Commented:
creating a script and publishing the script is a great option. could you help me create one. when the user opens the application i want this to be added to his users profile. once this change is made, his application will be licensed. and then i want to run an application executable located on the local drive of the citrix server. i have already purchased the licenses, and this license in per user/per profile so every users profile needs to be licensed. created a .reg file, so a script will first make changes to the profile and then launch the application

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

then  run the application for example c:\dameware\dm.exe
0
 
sirbountyCommented:
A batch method would be as follows.

Not sure what you're looking at providing for:
"Registered Name Update"="Your Registered User Name"
"Reg Number Update"="Your License Number"

Reg add "HKCU\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Reg Update" /t REG_DWORD /d 1
start c:\dameware\dm.exe

Open in new window

0
 
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
0
 
sirbountyCommented:
It's a "feature" with Start...try this:

Start "" "C:\Program Files\DameWare Development\DameWare NT Utilities\dwrcc.exe"
0
 
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,

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
 
mgmohiuddinAuthor Commented:
whenever we run the script which is published in citrix. when  the user launches the file, a dialogbox appears, asking if the user wants to RUN, Save or Cancel. is there a way i can aviod this dialog box from apprearing
0
 
sirbountyCommented:
Hmm - if it's the box I'm thinking of, it says something like "scripts can harm your computer..." - and is a safety feature built into the OS.

You can try right-clicking the shortcut, on the General tab there may be a Security section, with an "Unblock" button - clicking that may do it - but I'm thinking that one's more for EXE type applications.

Otherwise, is the script copied local?  I'm not very familiar with citrix, so not sure what you mean by "publish".  If it's local to the environment that the user is logged onto, it shouldn't be prompting...
0
 
mgmohiuddinAuthor Commented:
if you can provide me with the vb script that will be wonderfull. thanks in advance
0
 
sirbountyCommented:
Was I overlooked here or did none of my comments help you?
0
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.