need a script to add a few regsiter entries as part of a logon script when the user logs on

we have purchase some licences doe dameware and installed it on citrix. the product requires that every user registers seperately once he opens the tool as the registration information is stored in the users profile. the vendor says you could create a script and add the following in the script and this is what the vendor has to say

To deploy the registration information, a .REG file that contains the following Registry keys can be created.  Include this .REG file within the MST file to make this part of the installation process.  Here is how it works:
[HKEY_CURRENT_USER\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings]
"Reg Update"=dword:00000001

There is no way to register for "all users" on any specific machine.  It is possible to create a .REG file containing the appropriate registration information and place it into some type of login script for the users that need the software.

need a script to do this please
"Registered Name Update"="Your Registered User Name"
"Reg Number Update"="Your License Number"

i have the license number, can someone help me with a script

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.

Michael PfisterCommented:
You can do that in 3 lines plain batch scriping:


reg add "HKCUR\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Reg Update" /d 1 /f /t RED_DWORD
reg add "HKCUR\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Registered Name Update" /d "Your Registered User Name" /f /t RED_SZ
reg add "HKCUR\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Reg Number Update" /d "Your License Number" /f /t RED_SZ

If you want to limit the entry to be applied to users that are allowed to use Dameware, create a AD group and check with ifmember (part of the 2003 resource Kit http://www.microsoft.com/downloads/details.aspx?familyid=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en)

IfMember "Dameware"
If not errorlevel 1 Goto :SkipReg
reg add "HKCUR\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Reg Update" /d 1 /f /t RED_DWORD
reg add "HKCUR\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Registered Name Update" /d "Your Registered User Name" /f /t RED_SZ
reg add "HKCUR\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Reg Number Update" /d "Your License Number" /f /t RED_SZ
:SkipReg

Hope it helps

0
Michael PfisterCommented:
Sorry, typo.
ifMember "Dameware"
If not errorlevel 1 Goto :SkipReg
reg add "HKCU\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Reg Update" /d 1 /f /t REG_DWORD
reg add "HKCU\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Registered Name Update" /d "Your Registered User Name" /f /t REG_SZ
reg add "HKCU\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Reg Number Update" /d "Your License Number" /f /t REG_SZ
:SkipReg

Open in new window

0
mgmohiuddinAuthor Commented:
I am extremely sorry for the silly question, i have updated the company info, license key. and now should save it as a .reg file or cmd. i save it as reg gives me an error. i want to run this as a batch file or script. i saved it as a vbs file also but gives me an error in some line and character. appreciate if you can help
0
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

mgmohiuddinAuthor Commented:
just to give you the complete text of what the vendor has to say, here is the procedure. i am using mini remote tool only not the complete tool


Beginning with version 4.1, DameWare software uses Microsoft's Security APIs (CryptoAPIs) to encrypt and store the registration information.  The Registry keys below will instruct the software to extract the registration information from the Registry and then pass it to Microsoft's security API's, which registers the software without having to click on the Help / About menu.  This allows an Administrator to "push out" a Registry key, or even include it in a user's login script, without having to physically send the Registration information to every remote user.

Each time the software starts up, it will look to see if the "Reg Update" Registry key has been created and set to 1 (i.e. retrieve the registration information from the Registry).  If so, it will look for the appropriate Registry keys for the User, Company, and License information so it can populate the registration information into the software.  After the software retrieves this information from the Registry and the registration process is successful, it will delete the specific Registry keys (only) so that an attempt to re-register the software every time it starts up is not made.

If exclusively deploying the DMRC program, only the second key (i.e. DWRCC Settings) is needed.  If deploying the DNTU program it is recommended that all three keys be included.

The version 5.x & 6.x Registry Keys are the following:

[HKEY_CURRENT_USER\Software\DameWare Development\NT Utilities\DNTU\Settings]
"Reg Update"=dword:00000001
"Registered Name Update"="Your Registered User Name"
"Reg Number Update"="Your License Number"

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

[HKEY_CURRENT_USER\Software\DameWare Development\NT Utilities\Exporter\Settings]
"Reg Update"=dword:00000001
"Registered Name Update"="Your Registered User Name"
"Reg Number Update"="Your License Number"

you gave me the script, i am pasting it as i modified , not working maybe some mistake

reg add "HKCU\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Reg Update" /d 1 /f /t REG_DWORD
reg add "HKCU\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Registered Name Update" /d "My company" /f /t REG_SZ
reg add "HKCU\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings" /v "Reg Number Update" /d "8B8D7xxDDBDA00B0-D9" /f /t REG_SZ
:SkipReg

now save it as what and vbs, .reg, cmd
0
Michael PfisterCommented:
What I gave you was a .cmd/.bat. But you can go a different way:

Open Notepad and paste the registry information you got from Dameware and insert your registration info.
Now save this file as "DameWare.reg". Put this file somewhere on your Citrix server, lets say C:\WINDOWS. Now a double click on  this file will import the settings to the logged on user (exept you have disabled regedit).

To automatically add the info when a user logs on, I need a bit more information: do you run a logon script on your Citrix server? If yes, what language (VBScript, cmd) is used?
0
mgmohiuddinAuthor Commented:
i will use a logon script in group policy or terminal services profile or i also have the option on the citrix server to run a program before opening th epublished application. firstly i want to make sure it works manually and if it does, i will test the citrix option. a cmd or a bat file should be fine. thanks a lot, i will check this out and let you know in a moment
0
mgmohiuddinAuthor Commented:
the problem is the user cannot access local drives on the citrix server. he just runs the application. i tried actually something like this. i copied the following lines in a file and saved it as a reg file. logged on to the server and ran the reg file. still the sw is not activated. i can include the reg file in a batch file but the reg file itsely is not working. that is why i have given you all the details the vendor says. domt know where exactly am i missing ont on. after i ren the reg file, it says successfully updated the registry, i go the the path to verify the settings still the sw is not activated. below is what i put in my reg file.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings]
"Reg Update"=dword:00000001
"User Name Update"=""
"Company Name Update" ="my company"
"Reg Number Update"="xxxxxxx"

0
Michael PfisterCommented:
Create a file like this:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\DameWare Development\NT Utilities\DNTU\DWRCC Settings]
"Reg Update"=dword:00000001
"Registered Name Update" ="my company"
"Reg Number Update"="xxxxxxx"

I don't know why you suddenly have "User Name Update" or  "Company Name Update". The info from Dameware does not mention them.

If users can't access C: its just an Windows Explorer thing. I'm pretty sure a script will still work, so a script with regedit /s dameware.reg will do it.
0
mgmohiuddinAuthor Commented:
i created a reg file and when i login as a new user and run the reg file it is correctly updating the registration information. then i made a batch file as follows

regedit.exe /s C:\DameWare Development\DMregistrationkey.reg

and when i run the file, it is not adding the entries in the registry as a manually running the .reg file. guess i am almost there, i need a batch file now to run the reg dile. what i did was greated a new user, registered the sw manually for him and then exported the registry subkey. removed unique info and it is working. final batch file prease and i will close the question. thanks a lot sir
0
Michael PfisterCommented:
Change

regedit.exe /s C:\DameWare Development\DMregistrationkey.reg

to

regedit.exe /s "C:\DameWare Development\DMregistrationkey.reg"

Make sure users have read permission to the directory C:\DameWare Development
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
mgmohiuddinAuthor Commented:
thanks a lot sir
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
VB Script

From novice to tech pro — start learning today.