SecureUxTheme icon indicating copy to clipboard operation
SecureUxTheme copied to clipboard

Command line parameters.

Open boromyr opened this issue 3 years ago • 4 comments

Hi, is it possible to add command line parameters to start the program in custom scripts? Application example: change theme to Auto Dark Mode in personal script.

boromyr avatar Dec 26 '21 16:12 boromyr

well, so far the intended way to accomplish that was to simply write your own program based on snippets from here. what do you think would be a good set of arguments to have?

namazso avatar Dec 26 '21 17:12 namazso

I'll give you an example: uxtheme.exe "C:\path\theme.msstyle" -b(ignore background) -c(ignore cursor) -s(ignore sound) etc. Default: don't ignore anything. Very simple but effective, what do you think?

boromyr avatar Dec 26 '21 22:12 boromyr

I can't set msstyles, only themes. I also only know their display name, which may also change per locale. The rest of the functions are unstable across versions. I could also potentially use this function to set a theme by path, but i never tried that

namazso avatar Dec 28 '21 06:12 namazso

Even "C:\path\theme.theme" is fit for purpose. In fact, it's actually better because it's more complete.

boromyr avatar Dec 28 '21 13:12 boromyr

Bump

EnhancedJax avatar Sep 29 '22 09:09 EnhancedJax

This will not be implemented, I opted to go with a library and C FFI interface. You can track that issue at #120. You will be able to implement the command line interface of your choice on top of that.

namazso avatar Oct 01 '22 23:10 namazso

I was writing my own AutoDarkMode script when I stumbled upon this. A shame it won't be implemented. I suppose ADM will have to import or invoke more of SecureUxTheme to support truly dark themes.

BinToss avatar Jun 25 '23 01:06 BinToss

With the C interface you can just write a PowerShell script with whatever CLI you want. PS has been a part of Windows since Windows 7, therefore available everywhere where SecureUxTheme is.

namazso avatar Jun 25 '23 05:06 namazso