Modify / Add registry keys through GPO

Hi
How can we add / modify registry key through GPO (we are using Windows 2003 AD). Our requirement is to add / modify below key
HKEY LOCAL MACHINE\Software\Microsoft\Ole , Name: EnableDCOM, Type: REG_SZ, Data: Y
Thanks in advance 
LMS

Hi,
In addition to the above suggestions, Registry GPP is another alternative method to achieve your goal.
You do not need to upgrade to Windows Server 2008 or Windows Server 2008 R2 to use Group Policy Preference policies. You can configure a Group
Policy preference item in a Windows Server 2003 environment from either a Windows Server 2008/R2 server or a Windows Vista with Service Pack 1/Windows 7 client with RSAT update installed. If you do not have Windows Server 2008/R2 server, you can download
and install Remote Server Administration Tools on a Windows Vista or Windows 7 client to manage and configure them.
Microsoft Remote Server Administration Tools for Windows Vista 
http://www.microsoft.com/downloads/details.aspx?FamilyId=9FF6E897-23CE-4A36-B7FC-D52065DE9960&displaylang=en
Remote Server Administration Tools for Windows 7 
http://www.microsoft.com/downloads/details.aspx?FamilyID=7D2F6AD7-656B-4313-A005-4E344E43997D&displaylang=en
The CSEs for the new Group Policy preference functionality are required in Windows XP Service Pack 2 (SP2), Windows Server 2003 Service Pack 1 (SP1), and Windows Vista to process the new preference items. To download and install CSEs, please refer to the following
link:
Information about new Group Policy preferences in Windows Server 2008
http://support.microsoft.com/kb/943729
Regards,
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Similar Messages

  • "Add registry key to VHD to run VmRemoteTool on boot" task fails on SRIOVBasicVerification test

    Hi,
    I am running SRIOVBasicVerification test. I see below subtask "Add registry key to VHD to run VmRemoteTool on boot" is failing and does not produce any log.
    I have passed below parameters to the test.
    VMName    :Test
    VHDName  : 2012R2.vhd
    VHDPath    : c:\VHDs
    I have placed 2012R2.vhd in c:\VHDs of test machine.
    PS C:\VHDs> get-netadaptersriov
    Name                 : Ethernet 3
    InterfaceDescription : Network Adapter
    Enabled              : True
    SriovSupport         : Supported
    SwitchName           : Default Switch
    NumVFs               : 32
    Name                 : Ethernet 4
    InterfaceDescription :Network Adapter #2
    Enabled              : True
    SriovSupport         : Supported
    SwitchName           : Default Switch
    NumVFs               : 32
    Thanks, Krishna

    I use this vbscript at the end of my SCCM TS which writes the following to a regkey in HKLM\Software\SCCM_OSD
    It doesn't populate all the values but it does most of them and has been very helpful to me.
    This is what it writes to the key:
    Date Installed
    TaskSequenceName
    AdvertisementID
    Organization
    TaskSequence ID
    TSVersion
    SMSClientGUID (This is the original SMSClient Guid before OSD)
    On error resume next
    dim osd
    dim strkeypath
    set env = CreateObject("Microsoft.SMS.TSEnvironment")
    const HKEY_LOCAL_MACHINE = &H80000002
    'variables
    TaskSequenceName = env("_SMSTSPackageName")
    AdvertisementID = env("_SMSTSAdvertID")
    Organization = env("_SMSTSOrgName")
    TaskSequenceID = env("_SMSTSPackageID")
    Packagename = env("_SMSTSPackageName")
    MediaType = env("_SMSTSMediaType")
    TSVersion = env("TSVersion")
    SMSClientGUID = env("_SMSTSClientGUID")
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
    '----------- Write to registry ---------------
    strKeyPath = "SOFTWARE\SCCM_OSD"
    oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
    strValueName ="Installed Date"
    strValue = formatdatetime(date,2) & " " & formatdatetime(time,3)
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
    strValueName = "TaskSequenceName"
    strvalue = TaskSequenceName
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TaskSequenceName
    strValueName = "AdvertisementID"
    strvalue = AdvertisementID
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,AdvertisementID
    strValueName = "Organization"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,Organization
    strValueName = "TaskSequence ID"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TaskSequenceID
    strValueName = "TSVersion"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TSVersion
    strValueName = "SMSClientGUID"
    oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,SMSClientGUID

  • Taskbar Height Registry Key or GPO

    I have many computers on my network and I want them all to be standardized with the same Taskbar Height.
    I am looking for a Registry Key that defines the Taskbar Height...not the taskbar buttons or icons, but the Taskbar itself.  By default, Windows 7 installs with the Taskbar at 1 row in height.  I want to be able to set the Taskbar Height at 2 rows
    by changing the value of the key in the registry that defines Taskbar Height.
    If there is not a registry key that defines this, how can I change this in Group Policy so that all users on my network will have the same "2 row" Taskbar Height on their Windows 7 & Windows 8 systems?
    Lastly, I want to have all systems configured so that once the "2 row" taskbar height is set, users will not be able to change it.

    Hi,
    I have captured the registry key changes when I modified the size of the taskbar, there are only keys under HKEY_USERS have been changed:
    HKU\S-1-5-21-*****************\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop\TaskbarWinXP: 0C 00 00 00 08 00 00 00 02 00 00 00 00 00 00 00 AA 4F 28 68 48 6A D0 11 8C 78 00 C0 4F D9 18 B4 DB 02 00 00 C0 0C 00 00 00 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 8B 8A 0D 54 3F 1C 32 4E 81 32 53 0F 6A 50 20 90 3F 00 00 00 C0 04 00 00 00 00 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 52 00 00 00 00 00 00 00 01 00 00 00
    HKU\S-1-5-21-*****************\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop\TaskbarWinXP: 0C 00 00 00 08 00 00 00 02 00 00 00 00 00 00 00 AA 4F 28 68 48 6A D0 11 8C 78 00 C0 4F D9 18 B4 F3 02 00 00 C0 0C 00 00 00 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 7C 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 8B 8A 0D 54 3F 1C 32 4E 81 32 53 0F 6A 50 20 90 3F 00 00 00 C0 04 00 00 00 00 00 00 1A 00 00 00 00 00 00 00 00 00 00 00 7C 00 00 00 00 00 00 00 01 00 00 00
    HKU\S-1-5-21-*****************\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2\Settings: 28 00 00 00 FF FF FF FF 02 00 00 00 03 00 00 00 3E 00 00 00 52 00 00 00 00 00 00 00 AE 02 00 00 00 04 00 00 00 03 00 00
    HKU\S-1-5-21-*****************\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2\Settings: 28 00 00 00 FF FF FF FF 02 00 00 00 03 00 00 00 3E 00 00 00 7C 00 00 00 00 00 00 00 84 02 00 00 00 04 00 00 00 03 00 00
    So we can't implement what you would like, since this changes was saved based on user profile.
    Thanks for your understanding that it's designed by default.
    Kate Li
    TechNet Community Support

  • How to add Registry Settings to GPO with Apply once property

    Hi,
    I am using the Set-GPRegistryValue command in PowerShell add a number of registry entries into my GPO, I would like to configure these so that they are applied only once for each user.
    The Group Policy Management Editor allows me to configure this setting from the Common tab using the option "Apply once and do not reapply" but I would like to configured this using power Shell instead.  Can any one help, I cant fid an option
    to set this using Set-GPRegistryValue.
    Thanks

    Wrong command.
    Use Set-GPPrefRegistryValue with the Action parameter "Create" to apply once.
    http://technet.microsoft.com/en-us/library/ee461036.aspx
    ¯\_(ツ)_/¯

  • With 250+ machines on our school network, is there a way to turn on "clear history when firefox closes" (cache setting only) by modifying a registry key or file?

    I need a way to turn ON the clearing of the cache programatically within a logon script. Kids are not clearing the cache and the roaming profiles on the Windows XP and Windows 7 machines are getting way too big to be moved across the network on every logon and logoff. Otherwise we will have to remove Firefox, which I do not want to do, nor do most of the people in the school :)

    There have been some threads here about large-scale deployment, but I don't know whether they would help after Firefox has been installed.
    Random thought:
    I suspect (but haven't checked) that changing the "Clear Recent History" options would add corresponding entries to prefs.js in the user's profile folder. (These usually are added during Firefox shut-down.) That's just a plain text file and you could append to it by a variety of means.
    It might be possible to use a VBScript during logon to update that file before the user starts Firefox. The script would have to detect the random folder name(s) in order to make the update.

  • Where can I find the reference for modifying registry key for acrobat reader

    I am a Web Developer and I need to limit the option the user may choose in acrobat reader plugin.
    I doubt if there is option to configure in Windows Registry on HKCU\Software\Adobe\Acrobat Reader\9.0\PrefsDialog.
    Anyone know where I can find the reference for those registry key?
    I have downloaded sdk91_v2_win.zip file but I cannot find any reference.

    Refer to this:
    Direct Download Links for Adobe Software
    Mylenium

  • Can ZEN look for registry keys and modify them?

    I found some registry keys I need to change. But they are in the HK_USERS
    section of the registry which will be different on every PC. Can I make ZEN
    search for the key name and change it fi found?
    [HKEY_USERS\S-1-5-21-2238441965-2819776847-193749584-1006\Software\Novell\GroupWise\Address
    Book - User Interface\RFQ Options]
    "Auto Delete Enabled"="Yes"
    "Save Received from Internal"="No"
    "Save Sent to Internal"="No"
    "Auto Delete - Amount"=dword:00000001
    "Auto Delete - Units"="Weeks"
    [HKEY_USERS\S-1-5-21-2238441965-2819776847-193749584-1006\Software\Novell\GroupWise\Address
    Book - User Interface\Search Books]
    @="Selected List, Manual RFQ"
    "AB.4E6F76656C6C47576162703139393500.Novell GroupWise Address
    Book"=dword:00000000
    "AB.0081D836918BCE1187EB00805FB4B2BE.Frequent Contacts"=dword:00000001

    Robin Witkop-Staub,
    > I found some registry keys I need to change. But they are in the HK_USERS
    > section of the registry which will be different on every PC. Can I make ZEN
    > search for the key name and change it fi found?
    But they should be the same for CURRENT_USER. Ie HKEY_USERS is just all users'
    keys.
    - Anders Gustafsson, Engineer, CNE6, ASE
    NSC Volunteer Sysop
    Pedago, The Aaland Islands (N60 E20)
    Novell does not monitor these forums officially.
    Enhancement requests for all Novell products may be made at
    http://support.novell.com/enhancement
    Using VA 5.51 build 315 on Windows 2000 build 2195

  • Modify Registry Key in PowerShell

    I am trying to create a script to change a registry key or import a key into multiple computers. This is what I have but it is not working....this is what I have 
    $computer = Get-Content -path c:\computers.txt
    foreach ($computer in $computer) {
    Set- -cn $computer -ScriptBlock New-Item -Path HKLM:\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Seamless Windows -Name DeferredUpdateMode -Value False -Type String
    Thanks in advance!

    You need to use an explicit ScriptBlock:
    $sb={
    New-Item -Path 'HKLM:\SOFTWARE\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Virtual Channels\Seamless Windows' -Name DeferredUpdateMode -Value False -Type String
    $computer = Get-Content -path c:\computers.txt
    foreach($computer in $computer){
    Invoke-Command -cn $computer -ScriptBlock $sb
    It would be best to do this with Group Policy.  It would be consistent and  automatic.
    ¯\_(ツ)_/¯

  • Add Trusted Sites by GPO and allow the user to edit / add Trusted Sites manually.

    Hi All
    Greetings for the day....
    I have task to add a few Sites in Trust zone, Where I am succeed allowing them by GPO. As user requested to allow him to add Sites to add / edit manually. When I applied the Security Zone : Do not allow user to add sites to disabled , but it not allowing.
    IE options greyed out.
    Need your valuable expertise.
    J D Tech Guy........

    Hi,
    On local machines, this setting will be grayed out and users can’t change it, if we configured the setting from the following node:
    User Configuration > Administrative Templates > Windows Components > Internet Explorer > Internet Control Panel > Security Page\
    Site to Zone Assignment List
    However, we can try using GPP Registry to deploy the setting, for this will allow users to change the setting.
    Regarding this point, the following two threads can be referred to as reference.
    Managing Trusted Sites through Group Policy Preferences
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/5af55e6e-5495-404e-96bf-4183e8358245/managing-trusted-sites-through-group-policy-preferences?forum=winserverGP
    Add Trusted Sites via GPO but still allow users to add trusted sites
    http://community.spiceworks.com/topic/326140-add-trusted-sites-via-gpo-but-still-allow-users-to-add-trusted-sites
    Please Note: Since the second website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of
    this information.
    Best regards,
    Frank Shen

  • How do I identify the latest file modifications, application install, and registry key modification for Security Forensics.... using GP Audit for registry/file system

    Hello,
    Title pretty much states it all. I initially set out (as part of a Security Forensics initiative) to identify the most recently installed applications, modified files, and registry key changes using PowerShell. I attempted to pull this information and sort
    them by date installed/last modified, but it was brought to my attention this information isn't always present and can be modified - so it's not accurate.
    At that time it was suggested we use Group Policy auditing for Registry and File System -  but I'm not sure how I'm going to use/pull these in PowerShell? This will be used on remote host all over the world so local physical access isn't an option.
    My question is:
    Once Group Policy Auditing for Registry and File System has been enabled, how would I go about pulling those audit logs for review once a system has been identified as compromised? I'm brand new to this GP Auditing (we have a separate team for that) so feel
    free to take it from the beginning. :)
    Thanks in advance!

    Hi,
    Here are a few suggestions for you:
    Ensure Remote Registry service is started on local and remote machines.
    Add the – Credential option and supply administrative credentials within the command.
    More information for you:
    Get-Eventlog doesn't work against Vista/W7 clients
    https://social.technet.microsoft.com/Forums/en-US/c5185a01-b0d2-49a7-9aa7-52e6534ada04/geteventlog-doesnt-work-against-vistaw7-clients?forum=winserverpowershell
    PowerShell - How to Get XML EventData - Remote Eventlogs - Exchange Events
    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/382b10c9-d740-46b1-b81c-b24de911eb14/powershell-how-to-get-xml-eventdata-remote-eventlogs-exchange-events-?forum=ITCG
    Powershell script to gather failed logon attempts by event id and type from the security events log
    https://social.technet.microsoft.com/Forums/scriptcenter/es-ES/00a62492-c63a-4c8b-92f9-1cc857223a00/powershell-script-to-gather-failed-logon-attempts-by-event-id-and-type-from-the-security-events-log?forum=ITCG
    Best Regards,
    Amy
    Please remember to mark the replies as answers if they help and un-mark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Exchange BPA Errors (Exchange server is a virtual machine but the additional tools are not installed and The 'Services' string type value located in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\Setup\Services' registry key is missing)

    Hi,
    I am running BPA on My Exchange 2010 VM (Server 2008 R2 VM on Hyper-V) and get the following errors:
    The 'Services' string type value located in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\Setup\Services' registry key is missing or inaccessible. The Microsoft Exchange Information Store service won't start. As a result, all services that depend
    on this service won't be able to start
    Exchange server [Exchange Server FQDN] is a virtual machine but the additional tools are not installed. This configuration is not supported. Install Virtual Machine Additions for this guest.
    Problem is that, for the first, that Key exists and the service is actually running fine. And for the second my VM tools are already installed.
    Hopefully someone out there has had the same issue and can assist.
    Pete

    Hi Pete,
    For the first error message, please try the following steps:
    Make sure the Information Store service is in Starting status,
    Automatic startup type and works well, as a test we can try to
    restart the Infroamtion Store service and verify the service works well.
    Start
    Registry Editor, find the registry key “Services” under “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\v14\Setup”, its value is “C:\Program
    files\Microsoft\Exchange Server\v14”(default install location), please check your registry, make sure the key “Services” exist and value is the Exchange Server install location and the
    location is accessible;
    Start
    Registry Editor, and locate the following registry key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Exchange\Setup
    Use the
    Permission option under the Security tab to check the permission setting on this key. Make sure
    System is in the list with Full Control permissions if the service account is Local System. If you are not using Local System as the service account, check the existence of the corresponding account in the list and ensure that
    it has Full Control permissions. Please refer to this article:
    Title: Exchange Store Does Not Start: Errors 7024, 1026, 9542, and 5000
    Link:
    http://support.microsoft.com/kb/285116
    Start
    ADSI Edit, and then browse to the following location:
    Domain.com/Configuration/Services/Microsoft Exchange/Org/Administrative Groups/AdminGroup/Servers/Server Name
    Right-click the
    server name, and then click Properties.
    Click the
    Security tab, make sure this own server’s server object have
    full control permission on its own server.
    If not or the object is missing, please modify the permission or click
    Add, locate the computer account for the Exchange Server computer, add it to the Permissions list with full control.
    Click OK, and then close ADSI Edit.
    Use
    Active Directory Users and Computers to add the current affected
    Exchange Server computer account to the Exchange Servers(previous version should be “Exchange Domain Servers”) group in the
    Microsoft Exchange Security Groups( or Users) OU. Refer to this article:
    http://support.microsoft.com/kb/297295.
    Restart the Exchange Server computer, then rerun the ExBPA.
    For the second error message, Microsoft don’t recommend to install Exchange Server on virtual machine without additional tools, so the error message occurs. We can just ignore
    this message, it will not affect the Exchange servers.
    Regards, Eric Zou

  • Update registry key in Powershell

    Hi
    I want to loop through a bunch of registry keys in powershell. In one of the keys there's a value I want to change.
    I thought this would work and just return an error for all the keys where the values didn't exist
    get-childitem
    "hklm:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}"
    | foreach {set-itemproperty
    -path $_
    -name 'ChangeMe'
    -value '22'}
    However I'm getting this errors for all the keys even where the value exists.
    set-itemproperty : Cannot find path 'C:\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0009' because it does not exist.
    I've tinkered with Set-Location but it doesn't seem to make much difference. How can I transfer the path of the subkey to Set-itemProperty
    Cheers
    Alex

    actually it is not mapped drive, it is more like registry object. 
    for example:
    set-location HKLM:\
    get-childitem "hklm:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}" | foreach {set-itemproperty -path $_ -name 'ChangeMe' -value '22'}
    will add new property ChangeMe with value 22 to every item in this path:
    hklm:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}
    Imposible is nothing

  • Reportings Services in a 2-Tier Architecture / (Installation Error: Could not find SOFTWARE\Microsoft\Microsoft SQL Server\110 registry key. )

    Hello,
    we want to install Reporting Services in a 2-Tier Architecture. The Servers are the following:
    SERVER1: Windows Server 2012 and SQL Server 2012
    SERVER2: SharePoint 2013 (WFE)
    Reporting Server is installed on SERVER1 and running. On SERVER2 the registration of the service through Powershell was done but it does not start. An Error when starting the Service on the server occurs with the message:
    "Installation Error: Could not find SOFTWARE\Microsoft\Microsoft SQL Server\110 registry key."
    I have found the following in msdn stating that a minimal of the same SharePoint Installation must exist on the Reporting Server. The article is for SQL Server 2008 R2 and SharePoint 2010. Is this the case also for SQL Server 2012 and SharePoint 2013 and
    the root of the problem? http://msdn.microsoft.com/en-us/library/bb510781%28v=sql.105%29.aspx
    If so does this mean that I require for the installation another License?!?!
    Thank you in advance!

    Hi,
    According to your post, my understanding is that you wanted to install Reporting Services in a 2-Tier Architecture.
    As the article
    say, if you use Two-Computer Deployment, the first computer hosts an instance of a SharePoint product. The Reporting Services Add-in is installed on this computer. The second computer hosts SQL Server Reporting Services and the Database Engine.
    The steps to install in a  two-tier environment are very similar to a standalone environment hence you can go to refer to the ' Install Reporting Services SharePoint Mode for SharePoint 2013' article at http://msdn.microsoft.com/en-us/library/jj219068(v=sql.110).aspx
    To install in a  two-tier environment, you can refer to:
    How to setup, configure and test
    SQL 2012 SP1 SSRS with SharePoint 2013 SP1
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • VB Script to accept PC names in text file and get registry key value out of those systems

    Hi All,
    My task: Create VB script to accept PC names from a text file, process each host name to get Registry key value of individual host name and finally export them to a text file or an excel sheet having registry key value against each pc.
    I want to pull key value of LSFORCEHOST located in HKCU/Environment of each PC and export this value against each pc in a text or Excel file.
    What I achieved: I am able to process against single pc name but failed to process 3000+ systems listed in a text file which I tried to process through VB script. I am not pro and learning the VBS and cant write complex code.
    My VBS code written so far(It failed many time with issue):
     Option Explicit
     Const HKEY_CURRENT_USER = &H80000001
     Dim oFSO, sFile, oFile, sText, strComputer,oReg, strKeyPath, strValueName, strValue, objFSO, objFile, strContents
     Set oFSO = CreateObject("Scripting.FileSystemObject")
     sFile = "test.txt"
     If oFSO.FileExists(sFile) Then
      Set oFile = oFSO.OpenTextFile(sFile, 1)
       Do While Not oFile.AtEndOfStream
        sText = oFile.ReadLine
         If Trim(sText) <> "" Then
    strComputer = sText
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
        strComputer & "\root\default:StdRegProv")
    strKeyPath = "Environment"
    strValueName = "LSFORCEHOST"
    oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
    Const ForReading = 1
    Const ForWriting = 2
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.OpenTextFile("C:\destination.txt",1, ForReading)
    strContents = strValue
    Set objFile = objFSO.OpenTextFile("C:\destination.txt",2, ForWriting)
    objFile.Write strContents
    objFile.Close
    End If
    Loop
    oFile.Close
    End If
    I think when I tried to process each PC name from text file against registry key value, above code not working. As per my knowledge some issue in loop. Do I need to add FOR EACH feature? 
    Please help to correct it. Thanks in advance.

    I think when I tried to process each PC name from text file against registry key value, above code not working. As per my knowledge some issue in loop. Do I need to add FOR EACH feature? 
    Please help to correct it. Thanks in advance.
    Your code contains numerous errors. Furthermore you make things difficult for yourself by giving similar names to the objects used for your input and output. If you are a systems administrator then your best bet is to make an effort to learn the language
    instead of grabbing a few code fragments from here and there and hoping that somehow they will work.
    Try the cleaned up code below for this particular project. Note the consistent code indentation. It helps you enormously when trying to understand the structure of the code. Remember also that you must fully qualify all file paths. Writing to "Destination.txt"
    will cause endless confusion because you never know for sure where this file will reside.
     Const HKEY_CURRENT_USER = &H80000001
     Set oFSO = CreateObject("Scripting.FileSystemObject")
     sKeyPath = "Environment"
     sValueName = "LSFORCEHOST"
     sFile = "D:\Test.txt"
     If oFSO.FileExists(sFile) Then
       Set oInput = oFSO.OpenTextFile(sFile, 1)
       Do While Not oInput.AtEndOfStream
         sComputer = oInput.ReadLine
         If Trim(sComputer) <> "" Then
           Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
             & sComputer & "\root\default:StdRegProv")
           oReg.GetStringValue HKEY_CURRENT_USER,sKeyPath,sValueName,sValue
           Set oOutput = oFSO.OpenTextFile("D:\destination.txt",8, True)
           oOutput.WriteLine sValue
           oOutput.Close
        End If
      Loop
      oInput.Close
    End If

  • Remove the third party software through GPO

    Hi
    I'm trying to remove a software, that installed through GPO from every client machine. 
    Right click the software from GPO and select All Tasks -> Remove
    Select the radio button Immediately uninstall the software from users and computers and click OK
    In my client machine Run the command "gpupdate \force" in command prompt and restart my computer. but when i check in Add or remove programs the software is still there.
    Why it not removing from my client machine?
    I need to run "gpupdate \force" after every action in all computer to make the changes..? like update my software with new version
    Thanks
    Bobbin

    Most of the software have an uninstall string.where we can use to uninstall the software using command line.
    you can use below mentioned free tool to find uninstall string from the registry.
    https://finduninstallstring.codeplex.com
    once you find the uninstall string you can use logon or startup script to uninstall software
    Darshana Jayathilake

Maybe you are looking for

  • F.27 - combined statement for different company codes

    Hi,    In F.27 transaction, for sending account statement to customer, for a customer with open items in different company codes, a different account statement is generated for each company code. The business wants one statement per customer, with op

  • Bcp import error numeric value out of range

    lo, I have table with columns of type int. I export this table by using bcp: bcp dbo.int_table out file.dat -q -CRAW -T -S localhost -E .  Now I want to import it to table with columns of type bigint. I use bcp command: bcp dbo.bigint_table in file.d

  • Search result is not displaying in SharePoint 2010

    Hi,   For one web application only we are not getting any search results. All the site collections are of team site template. Contents are there in search scope. crawl is running fine. Disableloopbackcheck has been done. But still no result. The web

  • Problem import csv file with SQL*loader and control file

    I have a *csv file looking like this: E0100070;EKKJ 1X10/10 1 KV;1;2003-06-16;01C;75 E0100075;EKKJ 1X10/10 1 KV;500;2003-06-16;01C;67 E0100440;EKKJ 2X2,5/2,5 1 KV;1;2003-06-16;01C;37,2 E0100445;EKKJ 2X2,5/2,5 1 KV;500;2003-06-16;01C;33,2 E0100450;EKK

  • BAPI/  FM  FOR  Request For Quatation(RFQ)

    Hi Gurus, could  anyone  tel me  BAPI/FM   for  RFQ. Thanks in Advace.