Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all 15028 articles
Browse latest View live

Facing Problem while Auto Login in Gmail using COM Object

$
0
0

Hey Guys, Ashish Malik is here,

I am trying to auto login from a Powershell script but it is showing me this error

---The property 'value' cannot be found on this object. Verify that the property exists and can be set.---

Here is the code, Here username and password are dummy values, but in script,i am using real values.

$url = "http://gmail.com"
$username="xyz@gmail.com"
$password="xyz123"
$ie = New-Object -com internetexplorer.application;
$ie.visible = $true;
$ie.navigate($url);
while ($ie.Busy -eq $true)
{
    Start-Sleep -Milliseconds 1000;
}
$ie.Document.getElementById("email").value = $username
$ie.Document.getElementByID("Passwd").value=$password
$ie.Document.getElementById("signin").Click();



PowerShell Image Module

$
0
0

On Wednesday 10 Aug 2016 I used Get-EXIF to find the Width and Height of .JPG files under Windows 7.

Yesterday, however, under Windows 10 Pro, Get-EXIF worked but failed to populate the Width and Height fields.

Does that make sense ?

output is killing me

$
0
0

I am enjoying Powershell so far but continue to have trouble with formatting and routing output.

Today issue:  I just want to work with the output from Get ADCompter, description.  I need to display it or trim it, or put it in a variable .  

So lets start here.  What's up with the extra '@{Description=' ?

Get-ADComputer -Identity $computer -Properties * | Select Description | Out-file  -filepath  "c:\scripts\psout01.txt" -append

Get-ADComputer -Identity $computer -Properties * | Select Description | Write-host    (output below)

@{Description=HP8200 (WIN7) RCTraining Workstation 06 (Room R-1246)}

Thanks for the help   Chuck

Remove (e-mail) accounts with Powershell

$
0
0

The latest drop of Windows Mail started creating 100s of e-mail accounts. 

How do I remove these email accounts with a powershell script?

Searching for email in Active directory using CSV - output out-gridview

$
0
0

I am new at this and am trying to write a script which will search activedirectory based on emails and output them result using the out-gridview command. I ran the script below and it seems to work but not fully, below that is the error message that came on screen. Tried different scripts which were online but this is the only one that seemed to get me as close to what the script needs to do. Can someone help me find a solution for the error?

Import-Csv "c:\csv\file.csv"| ForEach-Object {Get-ADUser -Filter "EmailAddress -eq `"$($_.email)`"" |Select Name | Out-GridView

}

error message:

Get-ADUser : The search filter cannot be recognized
At line:1 char:57
+ Import-Csv "c:\csv\file.csv"| ForEach-Object {Get-ADUser <<<<  -Filter "EmailAddress -
eq `"$($_.email)`"" |Select Name | Out-GridView
    + CategoryInfo          : NotSpecified: (:) [Get-ADUser], ADException
    + FullyQualifiedErrorId : The search filter cannot be recognized,Microsoft.ActiveDi 
   rectory.Management.Commands.GetADUser


nks


Looking at different folders and combining files

$
0
0

Hi,

The code below is provided by someone else (unfortunately don't recall by whom) but it works.  I need to manipulate this code so that it looks not in the current folder but in the subfolders found in the directory I am working in and combine the pdf files found there.

TIA!

$workingDirectory = Split-Path -Parent $MyInvocation.MyCommand.Path;
$pdfs = ls $workingDirectory -recurse | where {-not $_.PSIsContainer -and $_.Extension -imatch "^\.pdf$"};

[void] [System.Reflection.Assembly]::LoadFrom(
    [System.IO.Path]::Combine($workingDirectory, 'itextsharp.dll')
);

$output = [System.IO.Path]::Combine($workingDirectory, 'output.pdf');
$fileStream = New-Object System.IO.FileStream($output, [System.IO.FileMode]::OpenOrCreate);
$document = New-Object iTextSharp.text.Document;
$pdfCopy = New-Object iTextSharp.text.pdf.PdfCopy($document, $fileStream);
$document.Open();

foreach ($pdf in $pdfs) {
    $reader = New-Object iTextSharp.text.pdf.PdfReader($pdf.FullName);
    $pdfCopy.AddDocument($reader);
    $reader.Dispose();  
}

$pdfCopy.Dispose();
$document.Dispose();
$fileStream.Dispose();

Problem using Set objExcel = CreateObject("Excel.Application")

$
0
0

I am trying to create a line chart but the command is returning an error that says

et-Variable : A positional parameter cannot be found that accepts argument 'CreateObject'.
At line:1 char:1
+ Set objExcel = CreateObject("Excel.Application")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Set-Variable], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.SetVariableCommand

How do I go about it

Folder access permissions - user breakdown

$
0
0

Hi,

Im not sure this can be done but here goes...

I have around 10 folders where I need to provide all users who have access - the problem is each folder has around 7 security groups attached. Is there a script I could run that can not only provides the groups but also break these down to display the users contained within? Im not overly concerned if the Security group name is listed, just the users i really need.

Thanks 


800A01AD wscript.stdin wscript.stdout

$
0
0

HI

I am on a Windows 2008 x86 version when I try to run any vbs that includes for example wscript.stdout stdin stderr I get the error "ActiveX component can't create object"

But if I use wscript.echo it works with no problems. Does anybody have any problem like this?

The same script on a Windows 2008 R2 works fine. I do not have any other win2008 x86 to test.

Same thing like here http://www.tek-tips.com/viewthread.cfm?qid=966381 but luck with the suggested steps.

invoke-command not holding variable data

$
0
0

I have this code:

$pc = Read-Host "Enter machine name"
$software = Read-Host "Enter software to search for"
$software
Invoke-Command -ComputerName $pc -ScriptBlock {
Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -like "*$software*" } | Select-Object DisplayName, DisplayVersion, UninstallString 
Write-host "your software is $software"
}

Right after the Read-Host my $software variable has my data.  But in the Write-Host command $software is empty.  Why?  How/why does it get wiped out and how do you make it retain the data?


mqh7

Powershell scripting the Windows 10 Export-StartLayout during logoff to effectively roam the StartLayout between computers.

$
0
0

It appears that the Export-StartLayout is not available during logoff. The goal is to roam the Start Tiles in an environment where every computer is the same. I am looking for feedback and ideas on how to detect StartLayout changes or get the export to work during logoff so that a background job or scheduled task does not need to run.

Here is how it works. As an AD or Local policy you would specify a computer startup script with the -startup parameter, a user logon script with the -logon parameter and a user logoff script with a -logoff parameter. You would also import the task immediately below (not to be confused with the task that JRV posted) to the task scheduler, its parameter is -task. For the task to run, either scripts need to be unrestricted or the script needs to be signed. When the logon script runs in the users context, its event triggers the scheduled task to run the script with the -task parameter in the local admin context.

During logoff the COM object that the app UserShellExperience or StateRepository and tiledatamodelsvc  services make available to the powershell Export-StartLayout are not available.

I already tried starting the StateRepository and tiledatamodelsvc services within the logoff script but they seemed to already be running.

This is the error recieved:

Export-StartLayout : Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
At C:\Windows\System32\GroupPolicy\RoamStartTiles.ps1:52 char:1+ Export-StartLayout -Path $RoamStartTilesXMLPath+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo          : NotSpecified: (:) [Export-StartLayout], COMException+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.StartLayout.Commands.Exp
   ortStartLayoutCommand

To get around this, a scheduled task (kindly provided by JRV, see his post "Here is the scheduled task.  You should be able...") could run periodically while the user is logged in to export the StartLayout. I prefer a background job instead.

I thought of using the login script to start watching the registry or filesystem with WMI or .Net FileSystemWatcher for changes regarding the StartLayout so the layout could then be exported but I dont see any detectable activity for pinning or unpinning.

The GPO Client Side Extension for StartLayout\Explorer does not expand variables in "\SOFTWARE\Policies\Microsoft\Windows\Explorer StartLayoutFile" so the value should be changed to something explicit\constant and use scripting to dynamically copy the users .xml there.

Another thought is to change the ACL's on each users  HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer key so that a script in the users context could manipulate the StartLayoutFile key during login.

An existing (Default User or %LocalAppData%\Microsoft\Windows\Shell\LayoutModification.xml) may take precedence. It might need to be deleted.

The starting and stopping of explorer is necessary during logon but the order and sleep could use some tuning. Explorer seems to start itself without the start-process.

Once the policy is removed, for the xml to apply again, the file date needs to be newer.

The script is:

param ( [switch]$startup = $false, [switch]$logon = $false, [switch]$task = $false, [switch]$logoff = $false, [switch]$export = $false ) #be carefull where you declare $RoamingRoamStartTilesXMLPath, $LocalRoamStartTilesXMLPath and $CurrentUsername because the "functions" run in different user contexts #currently only supports single sessions per computer $LocalStartTilesXMLPath = "c:\temp\RoamStartTiles.xml" $RoamingStartTilesXMLPath = "$env:appdata\RoamStartTiles.xml" $CurrentUsername = "$env:USERNAME" $ExportFrequency = 60

$ExportScriptBlock = [ScriptBlock]::Create("&'"+$MyInvocation.MyCommand.Definition+"' -export") if ([System.Diagnostics.EventLog]::SourceExists("RoamStartTiles") -eq $false) { New-EventLog –LogName Application –Source “RoamStartTiles” } if ($startup) { if (! (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer)) { Set-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name Explorer -Force } Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name LockedStartLayout -Value "1" -Type Dword -Force #%<appdata>% does not get expanded by the CSE, must use a constant directory and then copy to and from it Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name StartLayoutFile -Value $LocalStartTilesXMLPath -Type String -Force write-eventlog -logname Application -source RoamStartTiles -eventID 1 -entrytype Information -message "The RoamStartTiles powershell script has run as a computer login script." -category 1 } if ($logon) { if (Test-Path $RoamingStartTilesXMLPath) {Copy-Item $RoamingStartTilesXMLPath $LocalStartTilesXMLPath -force} if (Test-Path $LocalStartTilesXMLPath) {(Get-Item $LocalStartTilesXMLPath).LastWriteTime=(Get-Date)} Stop-Process -Name explorer Start-Sleep -s 2 write-eventlog -logname Application -source RoamStartTiles -eventID 2 -entrytype Information -message "The RoamStartTiles powershell script has run as a user login script for $CurrentUsername. If setup correctly, an attached task will be run against this event. Exports will commence at the duration specified in the export function" -category 1 Start-Sleep -s 2 Stop-Process -Name explorer Start-Job -Name RoamStartTilesExport -ScriptBlock $ExportScriptBlock #could use a scheduled task instead } if ($task) { Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer -Name LockedStartLayout -Value "0" -Type Dword -Force write-eventlog -logname Application -source RoamStartTiles -eventID 3 -entrytype Information -message "The RoamStartTiles powershell script has run as an event attached task script." -category 1 } if ($logoff) { Stop-Job -Name RoamStartTilesExport Remove-Job -Name RoamStartTilesExport if (Test-Path $LocalStartTilesXMLPath) {Remove-Item $LocalStartTilesXMLPath -Force} write-eventlog -logname Application -source RoamStartTiles -eventID 5 -entrytype Information -message "The RoamStartTiles powershell script has run as a user logoff script for $CurrentUsername." -category 1 } if ($export) { While($true){ Export-StartLayout -Path $RoamingStartTilesXMLPath write-eventlog -logname Application -source RoamStartTiles -eventID 4 -entrytype Information -message "The RoamStartTiles powershell script has run as a user export script for $CurrentUsername. XML was written to $RoamingStartTilesXMLPath. Sleeping for $ExportFrequency seconds." -category 1 Start-Sleep -s $ExportFrequency } }


The event:

<?xml version="1.0" encoding="UTF-16"?><Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"><RegistrationInfo><Date>2016-02-27T12:38:42.3226166</Date><Author>This-PC\havealoha</Author><URI>\Event Viewer Tasks\RoamStartTiles</URI></RegistrationInfo><Triggers><EventTrigger><Enabled>true</Enabled><Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Application"&gt;&lt;Select Path="Application"&gt;*[System[Provider[@Name='RoamStartTiles'] and EventID=2]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription></EventTrigger></Triggers><Principals><Principal id="Author"><UserId>S-1-5-18</UserId><RunLevel>HighestAvailable</RunLevel></Principal></Principals><Settings><MultipleInstancesPolicy>StopExisting</MultipleInstancesPolicy><DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries><StopIfGoingOnBatteries>true</StopIfGoingOnBatteries><AllowHardTerminate>true</AllowHardTerminate><StartWhenAvailable>false</StartWhenAvailable><RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable><IdleSettings><StopOnIdleEnd>true</StopOnIdleEnd><RestartOnIdle>false</RestartOnIdle></IdleSettings><AllowStartOnDemand>true</AllowStartOnDemand><Enabled>true</Enabled><Hidden>false</Hidden><RunOnlyIfIdle>false</RunOnlyIfIdle><DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession><UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine><WakeToRun>false</WakeToRun><ExecutionTimeLimit>PT72H</ExecutionTimeLimit><Priority>7</Priority></Settings><Actions Context="Author"><Exec><Command>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</Command><Arguments>-file C:\Windows\System32\GroupPolicy\RoamStartTiles.ps1 -task</Arguments></Exec></Actions></Task>

As the script is improved, I will update it inline.

Cross posted here:

https://communities.vmware.com/message/2578455#2578455

https://social.technet.microsoft.com/Forums/en-US/e2728aad-e94c-4303-b38b-9c309a6651e7/how-to-use-uev-to-roam-windows-10-start-tiles?forum=mdopuev





script to modify/add msRTCSIP-PrimaryUserAddress of contacts

$
0
0

please help me with a script to modify "msRTCSIP-PrimaryUserAddress" attribute for CONTACTS, i need to use a CSV file to bulk change. please give me the format for CSV as well..

Thanks in advance.

Export Action center settings and import them in another pc with a script

$
0
0

Hello everyone

I'm currently working on a scripting form project in vb.net, i made some scripts which edit my computer settings in regedit to configurate new computer within a few clicks instead of surfing through the whole settings and changing them manually.

I've found a solution for pretty much every windows setings, the only one that i still miss is the Action center settings "security messages" filter...


I need to do a script to deactivate all the warnings in a fresh installed windows.

 

i've found the keys in the registry with Process Monitor and i exported the .reg key and i have then converted it in a batch file with a software.

The  code that works (only) for my computer looks like this:

 

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{01979c6a-42fa-414c-b8aa-eee2c8202018}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c00000001000000033e8edb281b7dfb84791fda2c5934cc40000000004800000a000000010000000022b5f35fb3436858c36d36ba99ce7c028000000cb87b60833bd3e35bc940aecc3c93eeaa6310108341a64be4311d8d4a254a333ddd965a1a8fc233a14000000e743b52ba6658dbe55e1771fe5431407f6e41f5d" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{01979c6a-42fa-414c-b8aa-eee2c8202018}.check.101" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{088E8DFB-2464-4C21-BAD2-F0AA6DB5D4BC}.check.0" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c000000010000000b99f920c5b8e7921d5f0ca15b8980ebb0000000004800000a000000010000000ea6d5bb98aa7873ed5128f3ac3dffb3ea8000000ab555bf0981931d8deee8ddcc34acc365a99b6956107ca9f9c79b9fcb4fb2e057154f0162b13d9b249c622757ba1e13cff1494cdb694001a157df28e4a6905b4b24eeb280faee58f79dd59e54e43a6a362b94ba67d001fd0b93a19aeca826da026e5edb3f88d60b3f95481c30dc6fa8af9484a4805a6cb1d66c3ef4e05277380923f9297cc5eae44f8261b887d2101d3e8a2f68acce17b416e19fa42d0c4fcb94f23b8c41067b671140000002a2d84775ecc186463c47b71a02b412d132d2a01" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{11CD958A-C507-4EF3-B3F2-5FD9DFBD2C78}.check.101" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f00620000000000000000000000010000000000000000000000" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{134EA407-755D-4A93-B8A6-F290CD155023}.check.8001" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c0000000100000005cd0c6e0c13a4f2ad02b1767a832def30000000004800000a000000010000000344c0df44e88403fc4aec2571292471428000000f5ad54066b6a2607c921d03021fcbed6a5ec32b1555cc10da37cb7a95e5c895de3203f6bb38209e3140000005ef6d034fa35dfcc38c6360341c29de357708deb" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{2374911B-B114-42FE-900D-54F95FEE92E5}.check.100" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{34A3697E-0F10-4E48-AF3C-F869B5BABEBB}.check.9001" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c000000010000000aa07c41c7674615c6c11c83a5771c2220000000004800000a00000001000000006ad1c0f8b2556d82f9d57219d05187428000000eb6c3ee3f8f6b0c1ef0721326bf02086a5002a076cae1f1de9650c32dbf257046f64d95d1ae69c5b14000000d47059df4726103876e61e81d23ed830cfd7dc82" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{34A3697E-0F10-4E48-AF3C-F869B5BABEBB}.check.9002" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{34A3697E-0F10-4E48-AF3C-F869B5BABEBB}.check.9003" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{34A3697E-0F10-4E48-AF3C-F869B5BABEBB}.check.9004" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{3FF37A1C-A68D-4D6E-8C9B-F79E8B16C482}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c0000000100000000522c86b2fa6c1f3a0444c7c0a34ff3c0000000004800000a000000010000000f1446eb104de5022172e5a4eb9a4d39c2800000016d03099edacd5df2c09b3f7443aee8552504c5e097ceecd8a20b39d7441e3d7720653651bb691c914000000e79e20cfbbe06bb1d38b04396e13399c311e8d8a" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{852FB1F8-5CC6-4567-9C0E-7C330F8807C2}.check.100" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f00620000000000000000000000010000000000000000000000" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{852FB1F8-5CC6-4567-9C0E-7C330F8807C2}.check.101" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f00620000000000000000000000010000001000000000000000" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{96F4A050-7E31-453C-88BE-9634F4E02139}.check.8010" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c000000010000000f848a0ca3a89da269ed51d03ed7848030000000004800000a000000010000000259ce7a4ec5b66f6d2ee5314dd1d67e02800000008366d261bae74f1b42dbbc16dd3c4530a13c4c93c35e92cfd5f5589475c5a4dcc19b6d6abcb07f614000000a739e27588ae3f394f73c64327d71e08ae223406" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{A5268B8E-7DB5-465b-BAB7-BDCDA39A394A}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c000000010000000301c85bb87df91ecfa3c61dcff57b10d0000000004800000a0000000100000001fb0b404ba1d8426be25fb3f236bcea62800000077cd3e499e28935cda070c4ef995f6bb1833695670c67470c351f49aea9ababe057966b02916cc3714000000d3b25b11c05bc0b4f6b419a9a7da4c5bc5bc58be" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{AA4C798D-D91B-4B07-A013-787F5803D6FC}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c000000010000000394175648c48a8ff3031b55f49b142780000000004800000a000000010000000947f121ecc5ae607f98aedce0def6fde28000000db59d9207aaa680a8b6e882a559b9851b5bc51d35464c0bf46e270d126058e2b2fe2f1628b0fc565140000003f6b97bbb9437bc0baf63140a312b4e74d04d989" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{B447B4DB-7780-11E0-ADA3-18A90531A85A}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c000000010000000bd02b6365aac2ea0c19d80c8c1c7471d0000000004800000a0000000100000000de0d95c45ac4ecad914cce89312284f28000000dff4f0f5480cf82f3008c22119796c5fc80a3562fd2f0a91f30bd56e7fc8f1d6402896805616f35d14000000f43c5ae8c92fb67350db4c7048b7fa0c19df417b" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{C8E6F269-B90A-4053-A3BE-499AFCEC98C4}.check.0" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c000000010000000aaef93d398dbbcbd3b37004865669e1c0000000004800000a0000000100000008b0940338d17ef6cf11205eea6ed9cf628000000eb42eb770af6e1b6c526dd97d496ddf3b9c601b45ebc463e84612b7f52785f9902ed787b255ec5df14000000a0dad36bcab860c882053f57a5a46e6e4170f664" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{D26DE5C1-C061-43F7-9C40-7517526CF1C1}.check.0" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f00620000000000000000000000010000000000000000000000" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}.check.800" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c00000001000000014813753a20c89a5fbd0082ed8161fc10000000004800000a000000010000000edf99072d1b5774dc523cfc1a53b211728000000c5e2305c30bc4900a050096c69fb5d8ad5600cc608e73cfeefaf3fd3a6cbf3487a580cbd6d0780ed14000000161bfe5ba6ce17211cde9b32474ef8a9fe8df98a" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c000000010000000f1624b34b5e943333fb30edc7273826f0000000004800000a0000000100000006fc11518fb28b583febefd2934e0a9852800000042e077837575d84e58945ca397f8b80e806bcd0a86f873184ad790e70115c165f33053090ec7e92714000000b2e2c48ef49fca8c265dd3bf4c2a77eb2e50bb25" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.101" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c000000010000000b3616a8fd8eeea0edb040e901dfe37600000000004800000a000000010000000a074efc27ec04c033ce64c5882dbfdcec80000006cb4085dc33ce9e8a7ea7481b52f13c08015a6aa6d32a7c760c74973933f909b25a1a9d80a2b97f99d139d116a3904b507ab42ca4f85678fcc74e6ab1e5f5bb0bd27268e50cccb61af5e9c36fc9dd3d54b4762caa9f13082540d5bae3a6f834c53ee4bfb1ee29eb97ad31d54d493c71a20eab179aa6c0101478325c4fdc1aebb20a91fe641c2e89546625daeb2c7da91a982d497901eb565b09f042fdf11043c832d9df5d1d466f3066b086ea0af8c24f3ef82f331382088c4c8240223eda55bf24834414334ceb014000000f667103e07ad852d81b485bdb8d74de77c832a4c" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.102" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f00620000000000000000000000010000000000000000000000" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.104" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb01000000f2e3ab87b5b1d941b927fdffb01dc7060000000002000000000003660000c0000000100000009b60982fa5a5876e19f4ce8c6638d52a0000000004800000a0000000100000005cf62895e128e3269ad16409b8f7259728000000b9565bd447a98fa0fc05b255a1b34db0431c115dfe0b39d9811496e11ca144815aec65dc6dd97a2914000000441fbda726085de233a38494ec0e501a66a6700f" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.106" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f006200000000000000000000000100000083c1b99b00000000" /f

 

 

On my computer this code works perfectly, so i thought i was finished

BUT

I tried the same code on another computer and on a laptop but the code doesn't work at all...

so i took the laptop and i did another scan with Process Monitor and i did exactly the same thing and here is how the code working for the laptop looks like:

 

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{01979c6a-42fa-414c-b8aa-eee2c8202018}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b400000000020000000000106600000001000020000000390f64b4476c71b1fbc621b5f8fbb84109c098f4a3441adc3d5ec49bb349d7b1000000000e80000000020000200000007d3d10e9068d3d755dbdc0f13ace3e591ec4ecbf9935d5faed5c13362d9aba7130000000a086f7b80f87a700f85d2419e7ad969fe5089a14e5f91d61a3ed64520da73fb0033f48be48442e36a9c6836e63d9240a400000002f561a80371cc5a407ce901d83670e060e5353590734de1a900ce50d4237c6ab5428e3b64fb7fe5fd1e509f4a19cbb0c82236766b3bd3053aaa11c7e32783a9c" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{01979c6a-42fa-414c-b8aa-eee2c8202018}.check.101" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{088E8DFB-2464-4C21-BAD2-F0AA6DB5D4BC}.check.0" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b4000000000200000000001066000000010000200000001fed959fd6c34f6f6b0c67630d433b813e4b9970dda974f307b3b9f6a03e1c94000000000e800000000200002000000061e693ebbff972b7dddb84aea2dfc136f8fbb01f045561cbc8ef77b3f886a8a2b0000000fef6cd4bead687ebeebd187cef76f8b27ead4170342a85319b76b69eb9f551ccaab8d3e7a6ac44cb59fac177b99676b0b7cbf954cb9c1c5058a30ed02cebb61c3714b2b49e854072bd18986bf6d1248da610855b03503475f4f77fde21a8515962379b83893269e5d782b9f62df72983a3517888eba61f63af84f927e14257f0ae58093e6003f9b0796bde00bac40a5455dff62d3032ef61b7b4d805a4f82e20f7630e19ffdca7a58134a34119b918c440000000b3b9331aca04ed4c2b16fc46ec63c334e9caa9b2a2d5260db4637ca2853f103e565fdb165d4be4c14154d9199e0863bac91b3cd369272a94c71761a41f4c6b1d" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{11CD958A-C507-4EF3-B3F2-5FD9DFBD2C78}.check.101" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f00620000000000000000000000010000000000000000000000" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{134EA407-755D-4A93-B8A6-F290CD155023}.check.8001" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b40000000002000000000010660000000100002000000075006a3ede9c1d89dc5043b90a0c112925a5c85e4f1431e00a6d7feb0616109e000000000e800000000200002000000080c4f313cebf8fca857c0cc056a80cb8373a0bc9dc5b3721b7f5d69a99b4bed830000000502ca5f25556c95ce83520e9dd4fb6dcb78ab7255c241d54340a4f5266ad3eedb2dd83d45bf1eccc584ad2ab5587cbdd40000000ad6b7a96d5d71055f57eede078e20d894b7b359b7ee74c4e85f0a67f8d83912b8032c516d1651732f32b8c33804069f682457b027b03a966ad18f25e672df403" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{2374911B-B114-42FE-900D-54F95FEE92E5}.check.100" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{34A3697E-0F10-4E48-AF3C-F869B5BABEBB}.check.9001" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b400000000020000000000106600000001000020000000f991fd3b624bab0c23dbc07e993dc5445c3b0c323077ee4b496d5d6c8377b7fd000000000e8000000002000020000000c30cfd64ba1f8bf181bc0f24bcb4a11c58af063a1ddf6876119d698950a021e230000000a1efc3efae4ac9a2fe4d0864bff3b87d2d621a8c8ef5db33b762ba1308b00e220c815ed8c0d1ee0cc361d13046fe27804000000079b921a37a041f73d98ded3ca10e59990ed7f98f15e08d7327a8d755db580af623df149f2286b2b1f02975289f5616f6f544eed3a354fe3c87e499903ba0325e" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{34A3697E-0F10-4E48-AF3C-F869B5BABEBB}.check.9002" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{34A3697E-0F10-4E48-AF3C-F869B5BABEBB}.check.9003" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{34A3697E-0F10-4E48-AF3C-F869B5BABEBB}.check.9004" /ve /t REG_SZ /d "" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{3FF37A1C-A68D-4D6E-8C9B-F79E8B16C482}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b400000000020000000000106600000001000020000000a78af01432e4864980fb04ce04b7dc4e8577e73c7faf2968aa621875a1d6f52d000000000e80000000020000200000001351ec0aaad6ec8445b0cb8387266887f4f835b02888e7d7499ca8d71363ea66300000006d941b621fe99f5e81d9f2917bf7e3ab210c4232bce926a0059dfca7d22f0ac1975524cb2d4b7ce8041d226961dd36aa400000001bce157de48485eb4b973519cb17d4c100c0da8574b536b97036257863589924ab67c3699eff3460b3ca902158065c3ccea9461042b01a0309c3b1ac49c92b8d" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{852FB1F8-5CC6-4567-9C0E-7C330F8807C2}.check.100" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f00620000000000000000000000010000000000000000000000" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{852FB1F8-5CC6-4567-9C0E-7C330F8807C2}.check.101" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f00620000000000000000000000010000006500720000000000" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{96F4A050-7E31-453C-88BE-9634F4E02139}.check.8010" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b40000000002000000000010660000000100002000000083dfdd9c51cd2126092e70ecb10950c89ce6ecd15a60a41bb7bc146017f14358000000000e80000000020000200000000404b62d1e2c0f018db6771935ab2a21dd80924a562c658faeb947b27bb61a6030000000f1bcbb65f972f17596fa7a372153c0582f44caba85afb789be9ad10bcd624d088535646a14ab40b650551299b7b5cce240000000467355889fe579d15597fd84b69c7365030ddda95bfd3e3b19e378052e982616c0fbdadba6b240cc32ad691554fdd0a5bc6cf2f7e4177fd5f26a6aeae5595390" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{A5268B8E-7DB5-465b-BAB7-BDCDA39A394A}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b4000000000200000000001066000000010000200000005687d55a56c4e2a9b43d9fd71899efa95a95df93a5e24e20cdb37d348197418c000000000e8000000002000020000000d7982494ca67a9ddc03c29b5b453eba6ad4d7f24861ac42c0718f12eec056ba530000000a6d24e1562153f3f30bbe0ca029f208f29b68825ea7dbf5a5ce593bbb5f464a38b38feceea0b2be9313f44af58f1f9d440000000f2c353625ad8e65c0f486edefbe47c241788fe0eef002cff7601bc2d9c477b09de6899417de1a42efc9c633f200ded29cdc622b2631dc378d67fd1d131b0d583" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{AA4C798D-D91B-4B07-A013-787F5803D6FC}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b4000000000200000000001066000000010000200000004cd4c70cbb89904654e301495b06a06d4b43e8ebd5e8d8a21c0e4a0c4f6d8ad7000000000e800000000200002000000035fd433aecb4e0b8a8b114a1448822f9e37637b77b1aeadb0b4a4f09ff2bbc8930000000d29c29b4cf44f7f9a5a6d8dd7ca48d59156665726eaf65be5ec6873219847a1be6f424383b64fbe99df602faa67c228640000000f37a1921ce02dc064174f3ef2135bc5216fc3e09d479d2b27674c08443a612a3d863d0ec1ff58d38b1ce041b8cc3bdc5bba1a4a84bb9a80c39423ca1491936fc" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{B447B4DB-7780-11E0-ADA3-18A90531A85A}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b400000000020000000000106600000001000020000000018fd0135ea1e48737b17ce01ecb4f500c3d83729f809705eecb5797dc57ae2b000000000e800000000200002000000095102aa655d3473e346a0d329b174af8f1278b09f3e8eab99b29a85db06008383000000061543769d52396d9586c05f3332bb5767a7581f0eaca6d1b63e537f23ea87184038023f1d6bc383732b1cf9dc2fcc56740000000bc52b0e4ccb745b0ff055768713375d3ac612eb9c9bf2a6c808e0648abac9a48360f3498b0f7b7cf8f6f2fe456505009f7657e52bfc9c34e3c4111ea17c2f3dc" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{C8E6F269-B90A-4053-A3BE-499AFCEC98C4}.check.0" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b400000000020000000000106600000001000020000000c135060e8022abba56a7a766622109160129e5421c64fc7e0812b544a3083175000000000e80000000020000200000009a8b0b3fb3257529b02ed0ab68ef20d8da854dbc911593a28990c0097b24f5f83000000094cf47b47eab8aff212387aed33bda3ef59dd7b42cae0680d31823a919ed0200f3baa9d4b9fc5f0d4d6521f29886af46400000006b371d748b3ae189c65c63428521b882aba92b8626fee2e0eeab9099dfb4c3dd94c959e45683c05c19fc2b46ea1fe75bccfe629778168ab5422daeac8c897e97" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{D26DE5C1-C061-43F7-9C40-7517526CF1C1}.check.0" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f00620000000000000000000000010000000000000000000000" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}.check.800" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b400000000020000000000106600000001000020000000cbefd0fb3e987c57c557a574111e700d4221b19680d19d394d49116b23738f35000000000e80000000020000200000006ad6392827e15f9a32abc3c47c9a7922b351312084e54e6286df3d5903389f69300000008f0ed077487076cbc4ca86de6ec81fa63e78d502375d4b72a0f14ebf278924702dd2f6e2da181cdaf8bddffbfb65899f400000006dac1b88b812b1e61c8620da4f76c887e415bb2e6fa20e8b5c0fc40ed193e494ef3c4e5f5b7aa20b9d7533945310933ba8637c991ad8422a640d1371d7f11b44" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.100" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b400000000020000000000106600000001000020000000e5cd1ff737292aa06920f5acb9da41465a239fe621d51fec51811c9bdfeb71f5000000000e8000000002000020000000eb297f3f6a5430c8e742cfe037009f1a5a28246baf60824d116be5a92282550dd00000005cfaa35e15eb4c112fa9212270b81b00c9c2bd98bb896fd2758f5a89002dcba21f1563fcd40ce1d83a61f427d8404e8e00bc3a820e9cb49c746fa2be2510ad1aabfae6fd898f2962857745a68274148857882681a9b5ace2aee71027f98b3b25564160bcb9db3b289023b1164b13f6f69710f0d44b55adb6685cd39b062bf9f8f9a38a5b9f01a26ae3b31a22895a1cb73f10f2d8db1a7748900e0ee5829e877593135bb11af84d8e45c55de31a84c0d53f2b9644ed97eeff2e94f6c93df2b935d92605d5c1b0295b072c2864f6fa277040000000cab90daf5efe507538c90595248cc5e590d1599f52aaee33d5446ad05589292ca29d989c31f015897503f04c2d77fe07c80a5cef5c02a9bf6a4eef2a8af5ae98" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.101" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b400000000020000000000106600000001000020000000670b733986e020c418375f1235e40e007e7eb3cf65a539076002e7690fa74d85000000000e80000000020000200000000cf60deddcab1db6372f21a15fd032f98a50649d5d82e338cd85a9a68ea9e9ccd0000000903cde10350744e45229ffc3b90b488eb23da0aca42cc03a6498645782647ff08cf1545cc4023e48b907dcd8bc8df7520a276311c106bc2057147898d15dfbb009e88505faad691f8190cbc17250f421d9b2b5c333edd79969a03bed4a7bb475a22f538ec65f834c92c4171fbf64eb6bc820ff31ebc2dcbc0851d2d240c862c75c039f54d3d339479e6f5a565ef585993a6b5a6de6a2b0be15c5f358d3e0ad92ca8e033cd7463fc3c764daf5b2b711a897ad1b6e4db75d580332af2abd45b284fb051da6e1ca07dfd21af02ad18f2e114000000003053fa4eaa0061dc1c21984ac6c360cb0b0fb4be5d971f116da2ac34035ee739e2f56879718ba37b146c88d03d6ceb6729ddc3206566bdf171dbcc413e2f834" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.102" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b4000000000200000000001066000000010000200000009550e57b1ba73b23a85663ea15b812f35bcde9b8cb3b9f7d2fb36c6801ceba8a000000000e8000000002000020000000b2fd7e737b2e1622893f36dcea940cc4102a0a011517725b39869ab4a8836aded0000000fd898a8eeabdd4defbf425fdaead4f0620822803eb240c2f69ae7bb7aa7d6d97635a17b92fa94edb1af94d44cb457be47ad378123c7b74e5e0364b41c8dff1cb24019c9f944938fbb5baa82d5192f03165169e12553643b15c72d72ed440e2efa4cdd43657f48b03fc9fbf60b26065eb6d2dd23d93098138e9da111627323da3fe039a45ca24df139af6bde4a87894637a51f02f6d8828c98ac2c94beb2db49ed3adc661c419f0226bc4e98d5f838e938f07520020affba79a753268d475dbd9d5b0d836f603e3300446d9c33712b823400000005da2c277e628d37074c168de27bfa944cf62d936290993ff1dfdcdd4fbbe1b8f5f5b9f2f015667e56dfadee40e30254fe2c6599bfe559cf59cd36e01f8a667eb" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.104" /v "CheckSetting" /t REG_BINARY /d "01000000d08c9ddf0115d1118c7a00c04fc297eb0100000048fe72f89a8c4947a0074e01d94263b4000000000200000000001066000000010000200000001d6aa447f456a197b0e41bfe2b8d208220592db37c7a96c38813016bab899078000000000e8000000002000020000000decf7dfc9a4296dfab25205ce09000308359c13df41d7167ed25bfa4b55c161330000000a0f11826ea37a99c1380313ddcb943f1b89a274ea6822a0016b6c1e2d5a1ddf30e625a4b17898a6b5cb67d1a9b776ffb40000000dac32ae5ef76313ce283b85b218584f491d3470775d19061033499b36d0c788ca29ddad62ef8e9693ef3d7aa7f752ed8918f50e949d9e3e47ce23f0b658fbdda" /f

Reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Security and Maintenance\Checks\{E8433B72-5842-4d43-8645-BC2C35960837}.check.106" /v "CheckSetting" /t REG_BINARY /d "23004100430042006c006f006200000000000000000000000100000083c1b99b00000000" /f

 

I did a very short analysis and i discovered that the key names, the GUID, the reg path are all exactly the same, 

the only thing that doesn't match, is the REG_BINARY value, Which is different for every Computer i've tested.

I've tried already to run the .reg file directly on another machine but the result is the same (and if you're wondering, yes, i killed and reopened explorer.exe and i've also tried to restart the computer but without any result)

I also tried do figure out how to read the HEX code, trying to interpretate it so i could make a script that "translates" some text in HEX and makes a compatible key for the target pc, but all i found translating the hex code was more or less looking like this:


...i think that explains my struggle enough...

 

 

 

Now the question is:

How can i made a script that adapts itself dynamically to every machine i lauch the script on?

or

is there a way to edit these settings without exporting Registry key?

 

i've found a solution for the past 40 scripts i've made, and they works pretty much all the same, except some special ones,  thsi is the only one that makes me struggle..

i hope that someone can really help me with this because i'm litteraly becoming CRAZY!!

 

thank you team :)



- GM -

Powershell custom object -ask for help to make my script more simple

$
0
0

Hi Guys

I'm new to powershell and I wrote a script to create custom object as below.

====================================================

$users = 'jacky','parker','andy'
$sids = '1','2','3'
$mobile = '123','456','789'


$objs = @()


for($i=0;$i -lt $users.Length;$i++)
{
    $name = $users[$i]
    $sid = $sids[$i]
    $phone = $mobile[$i]
   
    $ad_user = New-Object -TypeName PSOBJECT -Property (
                                          @{'DispalyName'=$name;
                                            'SID'=$sid;
                                            'MobilePhone'=$phone})   
    $objs += $ad_user

}

$objs

=========================================

the output was below

DispalyName SID MobilePhone
----------- --- -----------
jacky       1   123       
parker      2   456       
andy        3   789 

My question was can someone help to make my script a little simple since I thought it should have some way to make the script shorter.

Thanks

Jacky

Script to modify the registry key path on multiple computers

$
0
0

Hi All,

Need help with a batch file or a script which will modify the following registry key path on multiple computers which are listed in a text file or CSV file.

Modify the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS  to  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SMS_old


Thanks in advance.


Need a power-shell script to find install source file withing SCCM cache folder

$
0
0

Hello All,

I am looking for powershell script or command which should check if the a software install folder is available in CCMcache in multiple remote machines

The problem would be the CCMcache  folders name would be like below with some generic names. The script should go into each folder and check for install.wse file and check the title of the source folder and return if the content exist YES or No



PS 3.0, work with netsh interface ipv4 show interfaces (instead of get-netadapter) to see if wifi is used

$
0
0

Hi,

I'd like to list network adapters, their status and then conclude if connection used is wifi or lan.
Can be done with get-netadapter but the W7 PS 3.0 does not suppor that.

 netsh interface ipv4 show interfaces does show what I need, but how do I extract the "connected" and "Wireless" out of it?

Idx     Met         MTU          State                Name
---  ----------  ----------  ------------  ---------------------------
 12          25        1500  connected     Wireless Network Connection

Please advise.
J.


Jan Hoedt

Append Path to PSMODULE Path

$
0
0
Is there a way to append an additional path to the PSModule path on a server. Lets say the original PS module path is  %ProgramFiles%\WindowsPowerShell\Modules;%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules and I want to append an additional Path. Basically I have some servers that is running powershell 4.0 however powershell 4.0 doesnt have the modules that will enable you to run Microsoft native zip cmdlets. They are present in Powershell 5.0,  I know that but the developers do not want to run the risk of updating to 5.0 because they would have to retest all their scripts. Is their a way to load an addtional module either via GPO or via Powershell without overwriting the original PS Module Path.

Paul Drummond

Computer Count by Top-Level OU

$
0
0

Hey Scripting World,

I'm attempting to get a report from my AD. What I need is simply a total number of computer accounts within each top-level OU of my AD.

I've tried cobbling together other scripts, but none of them seem to work. Any ideas?

Schmeckendeugler

Check whether aplication in COMAdmin.COMAdminCatalog is running or not

$
0
0

Hi,

We have some applications running in COMAdmin Catalog.

We need to check whether the application is in STOPPED state or not.If the application is in STOPPED state we need to start it.

Could you please help us with the command to check the state of the application.

We have worked the below, however not sure how to identify the current state of the service Step App and Step Common.

set oCatalog1= CreateObject("COMAdmin.COMAdminCatalog")

er4=oCatalog1.StartApplication("STeP Apps")
End If
WScript.sleep 1000

er5=oCatalog1.StartApplication("STeP Common") 'case sensitive
End If
set oCatalog1= nothing

Thanks,

Nithya

Viewing all 15028 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>