?
Solved

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

Posted on 2008-11-17
11
Medium Priority
?
428 Views
Last Modified: 2012-08-14
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

0
Comment
Question by:mgmohiuddin
  • 6
  • 5
11 Comments
 
LVL 29

Expert Comment

by:Michael Pfister
ID: 22974564
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
 
LVL 29

Expert Comment

by:Michael Pfister
ID: 22974585
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
 

Author Comment

by:mgmohiuddin
ID: 22974866
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mgmohiuddin
ID: 22974896
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
 
LVL 29

Expert Comment

by:Michael Pfister
ID: 22974955
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
 

Author Comment

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

Author Comment

by:mgmohiuddin
ID: 22975095
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
 
LVL 29

Expert Comment

by:Michael Pfister
ID: 22975287
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
 

Author Comment

by:mgmohiuddin
ID: 22975339
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
 
LVL 29

Accepted Solution

by:
Michael Pfister earned 2000 total points
ID: 22975418
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
 

Author Closing Comment

by:mgmohiuddin
ID: 31517401
thanks a lot sir
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month15 days, 15 hours left to enroll

850 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