Page 1 of 1 1
Topic Options
#161499 - 2006-05-03 03:47 PM Context Menu Items
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
I want to write a logon script that will set specific Context Menu items on a machine. Basically if you look in your network neighborhood and browse the computers in your network, the context menu should have an option to RDP Connect to it or Shutdown.

For instance the item would hold a command like: "mstsc /v:%clickeditem% /console
or: shutdown -s %clickeditem%

Now I realise the keys to these are in the registry so the logonscript would have to set some registry values to achive this. So far the only registry key I've found is the one that relates to the "My Network places" context menu which is:
Code:

HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell


so you can make this:
Code:

[HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\Shutdown]
"SuppressionPolicy"=dword:4000003c
@=hex(2):53,00,68,00,75,00,74,00,64,00,6f,00,77,00,6e,00,20,00,54,00,68,00,69,\
00,73,00,20,00,43,00,6f,00,6d,00,70,00,75,00,74,00,65,00,72,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\Shutdown\command]
@=hex(2):43,00,3a,00,5c,00,57,00,49,00,4e,00,44,00,4f,00,57,00,53,00,5c,00,53,\
00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,75,00,74,00,\
64,00,6f,00,77,00,6e,00,2e,00,65,00,78,00,65,00,20,00,2d,00,73,00,20,00,2d,\
00,6d,00,20,00,5c,00,5c,00,54,00,68,00,69,00,73,00,20,00,43,00,6f,00,6d,00,\
70,00,75,00,74,00,65,00,72,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\RDP]
"SuppressionPolicy"=dword:4000003c
@=hex(2):52,00,65,00,6d,00,6f,00,74,00,65,00,20,00,44,00,65,00,73,00,6b,00,74,\
00,6f,00,70,00,00,00

[HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\RDP\command]
@=hex(2):43,00,3a,00,5c,00,57,00,49,00,4e,00,44,00,4f,00,57,00,53,00,5c,00,53,\
00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,73,00,74,00,73,00,\
63,00,2e,00,65,00,78,00,65,00,20,00,2f,00,63,00,6f,00,6e,00,73,00,6f,00,6c,\
00,65,00,00,00


Any help would be appreciated

Top
#161500 - 2006-05-03 04:16 PM Re: Context Menu Items
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
This is pretty basic WriteValue() stuff. Where are you having problems?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#161501 - 2006-05-03 04:18 PM Re: Context Menu Items
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
The problem is knowing the right keys to write
Top
#161502 - 2006-05-03 05:34 PM Re: Context Menu Items
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You writing keys or values? Do you know your keys from your values?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#161503 - 2006-05-03 09:12 PM Re: Context Menu Items
Chance Offline
Fresh Scripter

Registered: 2004-10-17
Posts: 12
Loc: Almere, The Netherlands
Values, and yes I know the difference. No need to patronize me.
_________________________
can not join #Real_Life (invite only)

Top
#161504 - 2006-05-03 10:33 PM Re: Context Menu Items
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Who are you and why are you replying to apronk's thread?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#161505 - 2006-05-04 08:28 AM Re: Context Menu Items
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Sorry about that, Chance is me at home, cookies make me login as him still, I'm too lazy to remove it
Besides that, I ment to say Keys, the values I know.

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.056 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org