#117216 - 2004-04-02 02:49 AM
Re: taskmgr - automating "hide when minimized"
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
this is going to be long....
but this worked for me....If there are other non default settings you will probably want to change them first then grab the key from below.
Code:
$null = WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\TaskManager","Preferences",
"9c020000e8030000020000000100000001000000a6030000350100003a0500008c030000010000000000000002000000030000000400"+
"0000ffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"+
"00000000000000000000000000000000000000000000000000000000000000000000000000000000600060003c006000ffffffffffff"+
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000100000002000000"+
"03000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"+
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000000000000000000000"+
"0100000000000000010000000000000000000000020000000400000006000000ffffffff000000000000000000000000000000000000"+
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"+
"0000000000000000000000006b0000006b0000002300000046000000ffffffffffffffffffffffffffffffffffffffffffffffffffff"+
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"+
"ffffffffffffffff00000000010000000200000003000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"+
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"+
"ffffffff67000000000000000000000001000000","REG_BINARY")
Edited by CitrixMan (2004-04-02 06:07 PM)
|
Top
|
|
|
|
#117217 - 2004-04-02 03:41 AM
Re: taskmgr - automating "hide when minimized"
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Great googly moogly! Ever hear of "blah" + "blah" (e.g. breaking long lines)?
|
Top
|
|
|
|
#117219 - 2004-04-02 07:42 AM
Re: taskmgr - automating "hide when minimized"
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
What you talking about Chris?
It's only about 1,337 characters long
|
Top
|
|
|
|
#117221 - 2004-04-02 10:07 AM
Re: taskmgr - automating "hide when minimized"
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Okay Shawn,
This works on my home Windows XP SP1 system, but have not tested it on any other systems yet.
It should take whatever you're current TaskManager preferences are and keep them and only change the SHOW/HIDE portion of the registry flag.
Simply use either SHOW or HIDE in SetTaskManager('show or hide') No matter what you put, unless it is hide it will become show.
Code:
Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('WrapAtEOL','On')
SetTaskManager('hide')
Function SetTaskManager($Flag)
Dim $Settings,$Count,$i,$x
$Flag = IIF($Flag='hide','67','47')
$Settings = ReadValue('HKCU\Software\Microsoft\Windows NT\CurrentVersion\TaskManager', 'Preferences')
Dim $Regstring[(Len($Settings)/2)-1]
For $i = 1 To Len($Settings) Step 2
$Regstring[$Count] = SubStr($Settings,$i,2)
$Count = $Count + 1
Next
$Regstring[652]=$Flag
$x = WriteValue('HKCU\Software\Microsoft\Windows NT\CurrentVersion\TaskManager', 'Preferences',Join($Regstring,''),'REG_BINARY')
EndFunction
Once you find out what all the values do, you coud easily modify this UDF to use the key and value as input for changing.
|
Top
|
|
|
|
#117223 - 2004-04-02 10:22 AM
Re: taskmgr - automating "hide when minimized"
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Not sure why Tim (Shawn)
Wants to hide it, but hide and minimize are two different things.
Why would you even want to load or launch the Task Manager during startup? What does it do for the user?
Also, MCA did some kind of script work with this key in a cleanup script.
http://home.wanadoo.nl/scripting/download/cleanup.kix
Edited by NTDOC (2004-04-02 10:29 AM)
|
Top
|
|
|
|
#117227 - 2004-04-02 05:56 PM
Re: taskmgr - automating "hide when minimized"
|
ShaneEP
MM club member
Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
|
Hey Chris....
Sorry for the line lines...I warned you.
The reason I did not break them is because I tried breaking them in the script and it resulted in the the registry write not working correctly. Therefore I didnt want to break the lines and then have Shawn copy and paste and it not work.
So I did have good intentions of not breaking the long line law but in this case I figured it was better off just being long.
*edit*
Got the line breaks to work now...Must have been a typo before. Sorry...
*/edit*
Edited by CitrixMan (2004-04-02 06:08 PM)
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 369 anonymous users online.
|
|
|