Jump to content
Sign in to follow this  
gil900

need a function to disable/enable the "Use visual styles on windows and buttons" in windows

Recommended Posts

gil900

hello,

i need a function to disable/enable the "Use visual styles on windows and buttons" in windows 7

thanks for helpers!

Edited by gil900

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, gil900. We are not in the habit of spoon-feeding code to folks, but we are happy to assist. What have you tried thus far on your own? I would suggest beginning with a Google search of how to configure these settings in the registry, and then look at the Registry Management topic in the help file. Once you have something coded, even if it is not working the way you would like, feel free to post here and we can help you further.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
gil900

All I did was search on Google for how to do it through cmd.exe ..

But I did not find command for this.

If I was find that then I would not asked for it here

Share this post


Link to post
Share on other sites
JLogan3o13

A Google search of registry disable use visual styles on windows and buttons yields 596,000 results for me. The very first result (MSFN) shows you how to set this in the registry.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
gil900

I've never tried to change the registry through autoit.

Can you give me an example?

Share this post


Link to post
Share on other sites
JLogan3o13

I'll do you one better, I'll give you 7 examples! They're all located in the help file under RegWrite. :)

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
gil900

But the change is immediate?

I do not want to restart the computer for it ...

I'm just not sure that the change immediately.

Share this post


Link to post
Share on other sites
JLogan3o13

You're not sure because you haven't bothered to read the help file as I have suggested, and you surely haven't spent the two minutes it would take you to actually TRY something on your own. Sorry, I already have two small children, not looking to adopt any more. You've gotten your last from me on this topic until you show some effort :)


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
gil900

Sorry ..

I'm just lazy now and I wanted to save my power ..

Thank you for your help.

Share this post


Link to post
Share on other sites
careca

hahaha! you're awesome! cannot believe that you got that post count being that lazy...

EDIT: oh well, because you're so fun, i'll try to help you out.

Ok, so, registry:

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionThemeManager

there's a key:

ThemeActive

and you set it to either 0 or 1

That's it, come back when you have doubts.

Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
gil900

Actually I tried it .. But must to restart the computer for it to work.

The change is not done immediately ..

Share this post


Link to post
Share on other sites
nanr3d

Hello, you need restart "Temas" (Spanish) or "Themes" (English) Service for changes take effect immediately.

Share this post


Link to post
Share on other sites
careca

That comes a bit too late huh? :)


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
worldofwars1

Sorry to revive an older post (New to the forums aha).

Hopefully this helps someone with the same question.

Func ThemeStart()
If ProcessExists("cmd.exe") Then
   WinActivate("cmd.exe")
Else
   Run("cmd.exe")
EndIf

Do
   Sleep(100)
   $Win = WinGetTitle("[CLASS:ConsoleWindowClass]")
   WinActivate($Win)
Until $Win = True
WinWaitActive($Win)
ControlSend($Win,"","","net start themes")
ControlSend($Win,"","","{ENTER}")
ProcessClose("cmd.exe")
EndFunc

Func ThemeStop()
If ProcessExists("cmd.exe") Then
   WinActivate("cmd.exe")
Else
   Run("cmd.exe")
EndIf

Do
   Sleep(100)
   $Win = WinGetTitle("[CLASS:ConsoleWindowClass]")
   WinActivate($Win)
Until $Win = True
WinWaitActive($Win)
ControlSend($Win,"","","net stop themes")
ControlSend($Win,"","","{ENTER}")
ProcessClose("cmd.exe")
EndFunc

Share this post


Link to post
Share on other sites
careca

How about this for a disable and enable theme?

#include <Constants.au3>

$Theme = Run('cmd.exe', '', @SW_HIDE, $STDIN_CHILD)
StdinWrite($Theme, "net stop themes" & @CRLF)
WinWaitClose($Theme)
$Theme = Run('cmd.exe', '', @SW_HIDE, $STDIN_CHILD)
StdinWrite($Theme, "net start themes" & @CRLF)

Shorter and simple.

Edited by careca

Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites
gil900

How about this for a disable and enable theme?

#include <Constants.au3>

$Theme = Run('cmd.exe', '', @SW_HIDE, $STDIN_CHILD)
StdinWrite($Theme, "net stop themes" & @CRLF)
WinWaitClose($Theme)
$Theme = Run('cmd.exe', '', @SW_HIDE, $STDIN_CHILD)
StdinWrite($Theme, "net start themes" & @CRLF)

Shorter and simple.

This method requires admin privileges, what I want to avoid as much as possible.

i know another method that not requires admin privileges.

But I do not need this help.

This Thread is very old.

Thanks anyway

Edited by gil900

Share this post


Link to post
Share on other sites
orbs

@worldofwars1 , @careca ,

for short and simple, what's wrong with

RunWait('net stop themes')
RunWait('net start themes')

?

@gil900 , 

 

i know another method that not requires admin privileges.

 

care to share your knowledge?

Share this post


Link to post
Share on other sites
worldofwars1

@worldofwars1 , @careca ,

for short and simple, what's wrong with

RunWait('net stop themes')
RunWait('net start themes')

?

@gil900 , 

 

care to share your knowledge?

Huh... Didn't know you could do it that way. xD I don't normally do this kind of thing in autoit.

Share this post


Link to post
Share on other sites
careca

No problem, that works fine.


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×