Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

A VB Script to delete & then merge a registry file / key

Posted on 2006-07-05
3
Medium Priority
?
983 Views
Last Modified: 2012-08-13
Hi All,

I'm having problems with my Terminal Server Licensing Service, so as a fix i neen to create a vbscript to delete the following key HKEY_LOCAL_MACHINE\\Software\\Microsoft\\MSLicensing and import file \\birmingham\dfsroot\Private\Upgrades\TimeKeeper_TS\tslic.reg

Many Thanks
0
Comment
Question by:BarkersIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
justchat_1 earned 1500 total points
ID: 17047027
         Dim appShell
          Set appShell = CreateObject("WScript.Shell")
          Call appShell.Run("cmd.exe /k reg delete hklm\Software\Microsoft\MSLicensing /f", 1, True)
          Call appShell.Run("cmd.exe /k reg import \\birmingham\dfsroot\Private\Upgrades\TimeKeeper_TS\tslic.reg", 1, True)
          Set appShell = Nothing
0
 
LVL 1

Author Comment

by:BarkersIT
ID: 17049392
Thanks for you help, In the final solution I used some of your code, but amended it slightly as I did not want the command prompt popping up on screen, as we now have a pretty vbscript logon process.

I'll be awarding you the points as you are the only person that helped, and will post the code I used below

'---------------------------------------
' Install TS Reg Key - due to ts license server failure
'---------------------------------------
Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
wshShell.Run "reg delete hklm\Software\Microsoft\MSLicensing /f", 0, True
wshShell.Run "reg import \\birmingham\dfsroot\Private\Upgrades\TimeKeeper_TS\tslic.reg", 0, True
Set wshShell = Nothing
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 17053034
Glad to help...
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

610 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