Sign in to follow this  
Followers 0
Chris86

Shell Menu Item

7 posts in this topic

Hi, I have been searching around about how to execute a program with the shell menu, but I didn't understand it so well..

Could someone explain me how I can do it?

I want to make this usable with all file types..

HKEY_CLASSES_ROOT\*\shell

Share this post


Link to post
Share on other sites



RegWrite("HKCR\*\shell\Test", "", 'REG_SZ', 'Test Program')
RegWrite("HKCR\*\shell\Test\Command", "", 'REG_SZ', 'YourProgram.exe "%1"')

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks :P but what if i want to have several options

Ex:

Backup -> Backup on Web

------------- Backup on Pc

these are the args I want it to execute :unsure:

YourProgram.exe "-web %1"

YourProgram.exe "-pc %1"

Edited by Chris86

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

;next line is not essential, but adds custom description, otherwise Context will be say "WebBackup"
RegWrite("HKCR\*\shell\WebBackup", "", 'REG_SZ', 'Backup on Web')
RegWrite("HKCR\*\shell\WebBackup\Command", "", 'REG_SZ', 'YourProgram.exe -web "%1"')

;next line is not essential, but adds custom description, otherwise Context will be say "PCBackup"
RegWrite("HKCR\*\shell\PCBackup", "", 'REG_SZ', 'Backup on PC')
RegWrite("HKCR\*\shell\PCBackup\Command", "", 'REG_SZ', 'YourProgram.exe -pc "%1"')oÝ÷ ØÓýz-²êÞ2¢êÞÅ©©êk¢
Ú
+Æî¶'ò¢ên¶Ø^ªê-Áæõªê-wh¹¹^ªê-zËhëaz¹¨²Úk¢
ÚËz+Z²Þ¥ªÚë^­8Z·lÂv'g¢×h¶­êÞy²{¦¦WjG¬º·¨*.®è¶¦²·ªº*Þéí°@ÈL l¢'íêZ¶hb«>º ­©Åè¬b*.¬ðéïº'éíÊ·öYaj÷­¢Ê^r'ò¶ºYijØm¢+H~+ajË)iǬ{az­f¤zË«zÚ)ºØ­wh¹¹^ªê-zÉbëaÆ®¶­se&Vuw&FRgV÷C´´5"b3#²¢b3#·6VÆÂb3#µvV$&6·Wb3#´6öÖÖæBgV÷C²ÂgV÷C²gV÷C²Âb33µ$Tuõ5¢b33²Âb33²gV÷C´3¢b3#µ&öw&ÒfÆW2b3#µ÷W"&öw&Òb3#µ÷W%&öw&ÒæWRgV÷C²×vV"gV÷C²SgV÷C²b33²

Edited by Varian

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

hmm, It didn't work :S could it be caused by windows 7 that regwrite doesn't work?

Edited by Chris86

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Can you directly import a reg file? I'm not sure about Windows 7 rights and such, but I know that Vista required admin privileges to do RegWrite . You can either make a script that creates a regfile and then imports it, or you can use the commandline REG to add the keys. Yell if you need help.

EDIT: For kicks, try adding #RequireAdmin to the top of the script

Edited by Varian

Share this post


Link to post
Share on other sites

Yes :P I forgot the #RequireAdmin xD

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  
Followers 0