Check the state of the OS and proceed accordingly.

Page 7 of 7 FirstFirst ... 567
  1. Try3's Avatar
    Posts : 7,379
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #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. Matthew Wai's Avatar
    Posts : 4,998
    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. Ztruker's Avatar
    Posts : 13,502
    Windows 10 Pro X64 20H4 19042.746
       #63

    Changed the instructions to say Desktop or Downloads.
      My Computers

  4. RickC's Avatar
    Posts : 670
    Windows 7 + 10
       #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. Matthew Wai's Avatar
    Posts : 4,998
    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. Paul Black's Avatar
    Posts : 12,131
    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. Try3's Avatar
    Posts : 7,379
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #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. Ztruker's Avatar
    Posts : 13,502
    Windows 10 Pro X64 20H4 19042.746
       #68

    Head, wall, beat
      My Computers

  9. f14tomcat's Avatar
    Posts : 52,982
    Multi-boot Windows 10 - RTM, RP, Beta, and Insider
       #69

    Ztruker said:
    Head, wall, beat

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

      My Computers


 
Page 7 of 7 FirstFirst ... 567

  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 17:30.
Find Us




Windows 10 Forums