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?

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

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

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
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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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

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

From novice to tech pro — start learning today.