New
#61
Rich,
The new code, like the old, cannot be used in a path that has a special character in it such as &
Denis
Rich,
The new code, like the old, cannot be used in a path that has a special character in it such as &
Denis
Simply tell the user to download the script onto the desktop.
As long as the path contains&
, it does not work even if you select "Run as Administrator" on the right-click menu.
Last edited by Matthew Wai; 16 Aug 2020 at 00:25.
&
cannot be used because it is an operator reserved for future use and thus not allowed.
Code:Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\Windows\system32> PowerShell start "E:\A & B\Run as admin.cmd" -verb RunAs At line:1 char:12 + start E:\A & B\Run as admin.cmd -verb RunAs + ~ The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : AmpersandNotAllowed PS C:\Windows\system32>