Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

AddtoMNP.inf

- - - - -

  • Please log in to reply
3 replies to this topic

#1
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • OS:none specified
  • Country: Country Flag
Awhile back someone asked for help adding to the My Network Places context menu. Today i had some time to play with this and came up with an inf. The inf adds 2 things to the right click context menu:

1 - mstsc /console
2 - Shutdown remote computer

I often use mstsc /console so i can use the same session locally on my other computer. I also like to remotely shutdown that computer.

If you want to use this inf, change gosh2 in the inf to your remote computer. In a future version i might use a vbs file to prompt for the computername, but for now you will need to manually input it.

The inf is also uninstallable. If you dont like my tweaks, just uninstall it using add/remove programs.

Later tonite i'll try to add it to my site.

AddtoMNP.inf by gosh:

[Version]Signature=$CHICAGO$



; AddToMNP.inf
; Adds 2 entries to the right click context menu of My Network Places (MNP)
; written by gosh

[DefaultInstall]
AddReg = Add.RDP, Add.Shutdown, Add.Uninstall
CopyFiles = Gotoinf

[DefaultUninstall]
DelReg = Del.Registry
DelFiles = Gotoinf

[Add.RDP]
HKCR,"%RDP%","SuppressionPolicy",0x00010001,0x4000003c
HKCR,"%RDP%",,0x00020000,"Remote Desktop"
HKCR,"%RDP%\command",,0x00020000,"%11%\mstsc.exe /console"

[Add.Shutdown]
HKCR,"%Shutdown%","SuppressionPolicy",0x00010001,0x4000003c
HKCR,"%Shutdown%",,0x00020000,"Shutdown %pcname%"
HKCR,"%Shutdown%\command",,0x00020000,"%11%\shutdown.exe -s -m \\%pcname%"

[Del.Registry]
HKCR,"%RDP%"
HKCR,"%Shutdown%"
HKLM,"%Uninstall%"

[Add.Uninstall]
HKLM,%Uninstall%,DisplayName,,"%AppDesc%"
HKLM,%Uninstall%,UninstallString,,"rundll32.exe syssetup.dll,SetupInfObjectInstallAction DefaultUninstall 132 %17%\%thisfile%"

[DestinationDirs]
Gotoinf = 17 ;windows\inf

[Gotoinf]
%thisfile%




[Strings]

RDP         = "CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\RDP"
Shutdown    = "CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\Shutdown"
Uninstall   = "Software\Microsoft\Windows\CurrentVersion\Uninstall\%thisfile%"
pcname      = "gosh2"
thisfile    = "AddToMNP.inf"
AppDesc     = "Add to My Network Places by Gosh



If anyone has good idea to add to the right click menu let me know.

-gosh


How to remove advertisement from MSFN

#2
Nastradamus

Nastradamus

    Junior

  • Member
  • Pip
  • 58 posts
Thank's a lot Gosh

But what is the command line in a batch file ???

#3
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • OS:none specified
  • Country: Country Flag
You mean how to import the inf?

rundll32 setupapi,InstallHinfSection DefaultInstall 128 ..\Windows\Inf\the.inf

This inf i posted is outdated, i've changed it to startmenutweak.inf, which will be on my site shortly.

-gosh

#4
Nastradamus

Nastradamus

    Junior

  • Member
  • Pip
  • 58 posts
Sorry Gosh

It was a stupid question.

I import via tweak registry

That's more simple !

Here is the keys:

;"Shutdown Computer"
[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

;"Remote Desktop"
[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



All my felicitations for the quality of your site.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN