W4RH4WK / Debloat-Windows-10

A Collection of Scripts Which Disable / Remove Windows 10 Features and Apps
Other
6.06k stars 845 forks source link

install-basic-software.ps1 returns parse error #95

Closed Michlass closed 7 years ago

Michlass commented 7 years ago

Wen script is called, PS returns the following:

At C:\Users\michi\OneDrive\Documents\Debloat-Windows-10-master\utils\install-basic-software.ps1:53 char:27
+ rm "/SysinternalsSuite.zip"
+                           ~
The string is missing the terminator: ".
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
W4RH4WK commented 7 years ago

That sounds a bit strange, I'll have a look at it later. Does changing the double quotes to single quote help?

JonnyTech commented 7 years ago

Two of the hyphens earlier in the script (preceding Execute and Trigger) are actually dashes, could this cause the problem?

W4RH4WK commented 7 years ago

@JonnyTech thanks, I totally missed that. It could have caused the problem indeed. Anyway, the dashes are now replaced.

Michlass commented 7 years ago

Wow, never guessed that would be the problem. Seems to be solved now, thanks guys!

W4RH4WK commented 7 years ago

Apparently hyphen, en-dash and em-dash are accepted by PowerShell for commandline arguments, but it seems like the parser breaks somewhere down the line. Sorry for the inconvenience.