How to Play Sound at Logon (Sign-in) in Windows 10  

Page 3 of 8 FirstFirst 12345 ... LastLast

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

    Paul Black said:
    The Task exists, I downloaded it, ran it, STILL have the Window visible.
    Try this one: www.tenforums.com/attachment.php?attachmentid=328562

    Paul Black said:
    Surely there needs to be an amendment in the .bat file?
    The batch file is intended to be used with a password. I have a password, and I see no window.

    Paul Black said:
    Also, what about removing the > Please enter the run as password for DESKTOP\<UserName>:, is that possible?
    The following will create the task with a password:Schtasks /create /xml "%【XML】%" /Tn "%【Task】%" /RU "%Computername%\%Username%"

    The following will create the task without a password:
    Schtasks /create /xml "%【XML】%" /Tn "%【Task】%"

    I'm afraid the following option does not work without a password.
    Run whether user is logged on or not

    You may modify the batch script accordingly and see whether it works without a password.
      My Computer


  2. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #21

    Hello @Matthew Wai,

    Matthew Wai said:
    I'm afraid the following option does not work without a password.
    Run whether user is logged on or not

    You may modify the batch script accordingly and see whether it works without a password.

    I removed the /RU "%Computername%\%Username%" and that Stopped the entry on the Setup screen.

    I had already removed the need to enter the Password as I posted earlier.

    I Signed Out and then Signed In and it works great, other that having the CMD Window.

    EDIT:

    That works WITHOUT the Window.
      My Computer


  3. Posts : 7,607
    Windows 10 Home 20H2
       #22

    Paul Black said:
    I Signed Out and then Signed In and it works great, other that having the CMD Window.
    Have you tried this?
    https://www.tenforums.com/attachment...ay_a_sound.vbs
      My Computer


  4. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #23

    Hello @Matthew Wai,

    Matthew Wai said:
    That works WITHOUT the Window.
      My Computer


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

    I have to sleep. Let's continue tomorrow.
      My Computer


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

    Matthew Wai said:
    I have to sleep. Let's continue tomorrow.
    Thanks Matthew. Have a good sleep.
      My Computer


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

    @Paul Black, see whether the following settings work at your end.

    How to Play Sound at Logoff (Sign-out) in Windows 10
      My Computer


  8. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #27

    Hello @Matthew Wai,

    Matthew Wai said:
    @Paul Black, see whether the following settings work at your end.

    How to Play Sound at Logoff (Sign-out) in Windows 10

    The coding for that in respect to . . .

    Code:
    
    Set "【Command】=PowerShell"	
    Set "【Arguments】=-c (New-Object Media.SoundPlayer '%【Path】%').PlaySync()"

    . . . is virtually the same.

    I tried adding the Hidden, Minimize, and -WindowsStyle Hidden Parameters to the PowerShell line of code, but it did NOT work. Maybe it needs to be done through a CMD?

    Using the manual method to set this up fails because you HAVE to enter a Password, but with the script you do NOT.

    This looks quite interesting => How to run a PowerShell script without displaying a window?

    Even tried these . . .

    Code:
    
    Set "【Command】=CMD.exe /c Start /MIN PowerShell"
    Set "【Command】=CMD.exe /c Start /MIN PowerShell" -Window Minimized
    Set "【Command】=CMD.exe /c Start /MIN PowerShell" -Window Minimized -command ""

    In the Schema I tried changing the AllowStartOnDemand to Hidden=True . . .

    Code:
    
    %W%"<AllowStartOnDemand>true</AllowStartOnDemand>"
    %W%"<Enabled>true</Enabled>"
    %W%"<Hidden>true</Hidden>"

    Last edited by Paul Black; 21 Apr 2021 at 05:15.
      My Computer


  9. Posts : 7,607
    Windows 10 Home 20H2
       #28

    Paul Black said:
    Code:
    %W%"<Hidden>true</Hidden>"
    Do you mean <Hidden>true</Hidden> can hide the window at your end? If so, I can modify the script accordingly.
    I see no window at my end, so I can only rely on your observation.

    Paul Black said:
    Maybe it needs to be done through a CMD?
    If CMD is used, you will see a CMD window.
      My Computer


  10. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #29

    Hello @Matthew Wai,

    Matthew Wai said:
    Do you mean <Hidden>true</Hidden> can hide the window at your end? If so, I can modify the script accordingly.
    I see no window at my end, so I can only rely on your observation.

    Unfortunately NOT.

    I tried investigating the Schema to see if there was a <Control> or <Trigger> that might help, but I couldn't find one.

    Basically, I ONLY removed the %W%"<LogonType>Password</LogonType>" and /RU "%ComputerName%\%UserName% from the ORIGINAL code because I do NOT have a User Password, which works.
      My Computer


 

Tutorial Categories

How to Play Sound at Logon (Sign-in) in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  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 13:25.
Find Us




Windows 10 Forums