win11-toggle-rounded-corners icon indicating copy to clipboard operation
win11-toggle-rounded-corners copied to clipboard

auto start

Open adacom72 opened this issue 1 year ago • 14 comments

what am i missing i cannot get it to auto start - i have tried a shortcut in startup which shows and is set to run but it get round corners

i have further tried task scheduler - again i cannot start with sq corners

if i run the program after win11 has loaded all is good i have square corners - thats ok but as i understand it program should run at startup

adacom72 avatar May 03 '23 16:05 adacom72

Same here. A startup features would be nice.

gmmedia avatar May 15 '23 07:05 gmmedia

i have found that using explorer patcher - https://github.com/valinet/ExplorerPatcher - solves the problem - its not ideal as its said not to live well with startallback which is a must have for me

a second problem that whilst it seems possible to uninstall explorer patcher it seems to leave some settings behind so be careful if you try it or backup first so you can go back

other than that i have square corners at boot up

adacom72 avatar May 15 '23 07:05 adacom72

Hi, I was able to auto-start the app using Task Scheduler, using the procedure found here : https://www.windowscentral.com/how-launch-apps-automatically-during-login-windows-11

In the security options, you have to check "Run with highest privileges" for the app to launch correctly. I hope this help.

jeanmenard7 avatar Jun 16 '23 14:06 jeanmenard7

@jeanmenard7 - thanks thats excellent - i had tried this before but got nowhere - the 'run with highest privileges' seems to be the key to it working

i can now get rid of explorer patcher which whilst useful does not sit well with Startallback

adacom72 avatar Jun 16 '23 17:06 adacom72

hmmmmm - autoloaded for a week or so and has now stopped working - checked and all looks ok - i guess microsoft have changed something - will set it up again and hope

adacom72 avatar Jun 23 '23 18:06 adacom72

Just chiming in to say that task scheduler method still seems to be fucked. Unless there is something that OP and I both fucked up relating to it.

Maybe we just can't autorun this or something now, which is weird. Really wish MS just let us... toggle this. It should be a personalization feature that's just on by default. It looks nice to some people but awful to others. For them to probably unintentionally take this from us as well just sucks lol

LackOfCreativiT avatar Sep 08 '23 01:09 LackOfCreativiT

Hi, on my side it still works fine with the task scheduler and highest privileges, so it’s possible to make it work. Maybe it work only on some computer I don’t know why.

jeanmenard7 avatar Sep 08 '23 15:09 jeanmenard7

That's odd. I have that box checked. Maybe I'll try a bit more to make it work.

On Fri, Sep 8, 2023, 08:45 jeanmenard7 @.***> wrote:

Hi, on my side it still works fine with the task scheduler and highest privileges, so it’s possible to make it work. Maybe it work only on some computer I don’t know why.

— Reply to this email directly, view it on GitHub https://github.com/oberrich/win11-toggle-rounded-corners/issues/15#issuecomment-1711871135, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXCWTGZZKKGXFUNLU7FAO4LXZM4SVANCNFSM6AAAAAAXUUNEPA . You are receiving this because you commented.Message ID: @.***>

LackOfCreativiT avatar Sep 08 '23 21:09 LackOfCreativiT

Em…… The task scheduler approach works just fine for me. Make sure to have highest privilege and a trigger at log on (as any user or yourself as long as the path to the executable is accessible). If you use the trigger at start up or set the task to run even if you are not logged in (then you entered the password), it will not work.

Edit: I just added win11-toggle-rounded-corners to my scoop bucket here with the script to install it as a scheduled task.

ZhangTianrong avatar Sep 26 '23 22:09 ZhangTianrong

another way:

  • press Win+R
  • shell:startup
  • OK
  • copy win11-toggle-rounded-corners.exe
  • right-click in new opened folder => Paste shortcut
  • right-click on that shortcut or win11-toggle-rounded-corners.exe => Properties => Compatibility
  • check Run this program as an administrator
  • OK

if you have Nircmd, you can automate the above process with batch script blow (put it near win11-toggle-rounded-corners.exe and Run as admin):

@echo off
Nircmd.exe shortcut "%~dp0win11-toggle-rounded-corners.exe" ~$folder.startup$ "win11-toggle-rounded-corners" "" "" "" min "%~dp0"
reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v ""%~dp0win11-toggle-rounded-corners.exe" /t REG_SZ /d "~ RUNASADMIN" /f
echo.
pause
exit

amymor avatar Sep 28 '23 13:09 amymor

this gets more stupid - i added rounded corners to the task scheduler [AGAIN] and it worked perfectly for a few days - than it stopped working - its still in the task scheduler but simply refuses to work - i have changed nothing and there have been no updates to windows

i would guess if i delete it and start again it will be ok but each time i do that it stops after a few restarts

adacom72 avatar Oct 08 '23 08:10 adacom72

this gets more stupid - i added rounded corners to the task scheduler [AGAIN] and it worked perfectly for a few days - than it stopped working - its still in the task scheduler but simply refuses to work - i have changed nothing and there have been no updates to windows

i would guess if i delete it and start again it will be ok but each time i do that it stops after a few restarts

I'm not sure, but it seems like Windows 11 has messed up something with the startup, possibly a security layer. I've experienced something similar with the Startup folder. I have a batch script that turns off my GPU LED on startup. It worked perfectly on Windows 10, but I couldn't get it to work on Windows 11. Fortunately, I managed to get it to work with a simple VB.NET app. It's a launcher that runs the batch script as administrator invisibly (so make sure to put the exit command in your batch script). You just need to rename it to your batch script's name and put both in the Startup folder. Here is the code:

Imports System.Diagnostics
Public Module Whatever
    Sub Main
        Dim exeDirectory1 As String =System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
        Dim exeNameWithoutExt As String = System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().Location)
        Dim strParam As String
        strParam = "" & Command() & ""
        Dim ProcessProperties As New ProcessStartInfo
        ProcessProperties.FileName = chr(34) & exeDirectory1 & "\" & exeNameWithoutExt & ".bat" & chr(34)
        ProcessProperties.Arguments = "" & strParam  & ""
        ProcessProperties.Verb = "runas"
        ProcessProperties.RedirectStandardError = False
        ProcessProperties.RedirectStandardOutput = False
        ProcessProperties.WindowStyle = ProcessWindowStyle.Hidden
        Dim myProcess As Process = Process.Start(ProcessProperties)
      End Sub
End Module

To compile the code, first, paste it into a text file and change the extension from .txt to .vb. Next, open the command prompt with administrative privileges and use the following command to compile the code: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe /t:winexe /platform:x64 "Path_to_the_.vb_file"

Another solution is another VB.NET app that runs your batch script as an administrator invisibly. You just need to pass your batch script file as the first parameter, for example: VB-NET-Launcher.exe "C:\Scripts\MyScript.bat" In your case, you should create a shortcut to the VB.NET app in the Startup folder. Right-click on the shortcut, select Properties, and then go to the Shortcut tab. In the Target field, enter the full path of your batch script, for example: Target : C:\MyApps\VB-NET-Launcher.exe "C:\Scripts\MyScript.bat" Code:

Imports System.Diagnostics
Module Module1
    Sub Main(args As String())
        If args.Length > 0 Then
            Dim procInfo As New ProcessStartInfo()
            procInfo.UseShellExecute = True
            procInfo.FileName = args(0)
            procInfo.Verb = "runas" ' Run as administrator
            procInfo.WindowStyle = ProcessWindowStyle.Hidden ' Hidden batch Console
            Try
                Process.Start(procInfo)
            Catch ex As Exception
                Console.WriteLine("Error: " & ex.Message)
            End Try
        Else
            Console.WriteLine("No batch file specified.")
        End If
    End Sub
End Module

To compile this, use the same command that was provided for the previous code.

amymor avatar Nov 09 '23 13:11 amymor

this gets more stupid - i added rounded corners to the task scheduler [AGAIN] and it worked perfectly for a few days - than it stopped working - its still in the task scheduler but simply refuses to work - i have changed nothing and there have been no updates to windows

i would guess if i delete it and start again it will be ok but each time i do that it stops after a few restarts

If you are using a laptop make sure to uncheck this:

screen

These should also be checked:

screen

oberrich avatar Nov 13 '23 15:11 oberrich

I have added an installer to Release v1.2 that schedules a task on logon using schtasks. Minor drawback from using the CLI tool to schedule the task is that the "only if the computer is on AC power" option cannot be turned off, so this might not be ideal for laptop users, but should be a good option for the majority of users.

Edit: I will keep this issue open for context and visibility.

oberrich avatar Nov 16 '23 16:11 oberrich