Check the state of the OS and proceed accordingly.

Page 7 of 7 FirstFirst ... 567

  1. Posts : 16,956
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #61

    Rich,

    The new code, like the old, cannot be used in a path that has a special character in it such as &

    Denis
      My Computer


  2. Posts : 7,607
    Windows 10 Home 20H2
       #62

    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.
      My Computer


  3. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #63

    Changed the instructions to say Desktop or Downloads.
      My Computers


  4. Posts : 1,768
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #64

    Paul Black said:
    If anyone has got the dism.log AFTER running Dism.exe /Online /Cleanup-Image /RestoreHealth and would be kind enough to upload it please, I would be grateful!
    Paul - I don't see a reply to the request in this post. Are you still looking for a dism.log created after running Dism.exe /Online /Cleanup-Image /RestoreHealth ?

    If so, I have a 30KB dism.log from a Win 10 Home 1909 build that I can attach.

    Hope this helps...
      My Computer


  5. Posts : 7,607
    Windows 10 Home 20H2
       #65

    Try3 said:
    The new code, like the old, cannot be used in a path that has a special character in it such as &
    & 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>
      My Computer


  6. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #66

    Hello @RickC,

    RickC said:
    Paul - I don't see a reply to the request in this post. Are you still looking for a dism.log created after running Dism.exe /Online /Cleanup-Image /RestoreHealth ?
    No thanks, but I appreciate the reply.
      My Computer


  7. Posts : 16,956
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #67

    Matthew Wai said:
    & 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>
    I know
      My Computer


  8. Posts : 14,046
    Windows 11 Pro X64 22H2 22621.1848
       #68

    Head, wall, beat
      My Computers


  9. Posts : 56,831
    Multi-boot Windows 10/11 - RTM, RP, Beta, and Insider
       #69

    Ztruker said:
    Head, wall, beat

    This too shall pass...............

      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:38.
Find Us




Windows 10 Forums