Turn 'DragFullWindows' on

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
rhettbutler108
Posts: 1
Joined: 02 Jan 2018 03:30

Turn 'DragFullWindows' on

#1 Post by rhettbutler108 » 02 Jan 2018 03:45

Hey there!

I want to see the windows, while I drag them. This I can edit in c:\windows\system32\systempropertiesperformance.exe (effects) "Show window content while dragging".
What die edit do is, it sets the key HKCU\Control Panel\Desktop\DragFullWindows to value '1' and restarts the explorer.

Now you want to ask: "Why you generally want to write a script for that?"
The answer is, that some admin backup tool, which I don't know, how it works, set this value automatically back to '0' over night.

The batch file looks like this:

Code: Select all

@echo off
echo Turn on DragFullWindows
reg add "HKCU\Control Panel\Desktop" /v DragFullWindows /t REG_SZ /d 1 /f
echo restart Explorer
taskkill /f /im explorer.exe
start explorer.exe
echo Explorer back again
But after running this batch file, I still can see the borders of the windows while I drag them, although I can see the registry key is set to '1' and the explorer cleary restarts.

Thx

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Turn 'DragFullWindows' on

#2 Post by aGerman » 03 Jan 2018 11:16

Changing the registry only is not enough. Applications that change this value will send message WM_SETTINGCHANGE to all open windows. You can't do this using batch. Restarting explorer.exe will most likely only lead to take over the changed values for the explorer and all windows opened after the setting was changed.

Maybe Poweshell provides a possibility. But that's something I'm not familiar with.

Steffen

Post Reply