Chris86 Posted March 2, 2009 Share Posted March 2, 2009 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 Link to comment Share on other sites More sharing options...
Varian Posted March 2, 2009 Share Posted March 2, 2009 RegWrite("HKCR\*\shell\Test", "", 'REG_SZ', 'Test Program') RegWrite("HKCR\*\shell\Test\Command", "", 'REG_SZ', 'YourProgram.exe "%1"') Link to comment Share on other sites More sharing options...
Chris86 Posted March 3, 2009 Author Share Posted March 3, 2009 (edited) Thanks but what if i want to have several optionsEx:Backup -> Backup on Web------------- Backup on Pcthese are the args I want it to execute YourProgram.exe "-web %1"YourProgram.exe "-pc %1" Edited March 3, 2009 by Chris86 Link to comment Share on other sites More sharing options...
Varian Posted March 3, 2009 Share Posted March 3, 2009 (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Ǭ{azf¤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 March 3, 2009 by Varian Link to comment Share on other sites More sharing options...
Chris86 Posted March 3, 2009 Author Share Posted March 3, 2009 (edited) hmm, It didn't work :S could it be caused by windows 7 that regwrite doesn't work? Edited March 3, 2009 by Chris86 Link to comment Share on other sites More sharing options...
Varian Posted March 3, 2009 Share Posted March 3, 2009 (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 March 3, 2009 by Varian Link to comment Share on other sites More sharing options...
Chris86 Posted March 3, 2009 Author Share Posted March 3, 2009 Yes I forgot the #RequireAdmin xD Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now