Reputation: 49
I currently installed a fresh official Windows 7 Ultimate on my MacbookPro with BootCamp.
Everything is running good except Windows Update. Stuck on Searching for updates..
So I made a lot of google searches (for about 4 hours now) and I tried many things such as the FixIt tools from MS and other tricks but nothing is working.
Now i'm trying this: http://www.sevenforums.com/performance-maintenance/372790-very-high-memory-sometimes-cpu-usage-svchost-exe-up-1-gb-post3095241.html#post3095241
I'm now at using PowerShell and entering this command line:
sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
I always get this error:
Missing closing ')' in expression.
At line:1 char:23
+ sc.exe sdset bits D:(A <<<< ;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRS
DRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
+ CategoryInfo : ParserError: (CloseParenToken:TokenId) [], Paren
tContainsErrorRecordException
+ FullyQualifiedErrorId : MissingEndParenthesisInExpression
enter code here
I took a look at the commande line and I dont see any missing ')', and made some other google search for this command line from other websites and always give the same error
Whats wrong..!?
Update:
I tried this without success (same error)
$str = "sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
Invoke-Expression $str
Upvotes: 0
Views: 4811
Reputation: 1
Since this is invoking DOS use single quotes around the DOS command and add double quotes around the ACL "D:(A;;......;;PU)". It would look like this
Invoke-Expression -Command 'sc.exe sdset bits "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"'
Upvotes: 0
Reputation: 2448
PowerShell does not play well with DOS executable files and their arguments.
Try using:
Start-Process sc.exe -ArgumentList 'sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)'
Upvotes: 0
Reputation: 1
When I put quotes around the entire command, the dos prompt removed the quote marks, and returned the result. Putting the quotes around the long parameter list, i.e., doing this:
sc.exe sdset bits "D:(A;; [snip] ;;PU)"
resulted in the Dos Prompt executing giving the message Success.
Upvotes: 0
Reputation: 49
SOLUTION
I found the solution and its to type the command as follow:
CMD /C "sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)"
Upvotes: 1