Jump to content
Sign in to follow this  
Mat

Adding an exe to the system context menu's

Recommended Posts

Mat

For the this script, lets just say i want to make a script that goes in the right click menu for all files - and can be run so the file fills a variable in the script: $file.

$file = _________________________________________________________________
FileCopy ( "$file", "c:\Program files\", 1 )

there are two factors in this - help in either will be great!!

this site might just solve my context menu problems

How-to-geek

but how can i get it to work with the variables?

thanks

Mdiesel

Share this post


Link to post
Share on other sites
Varian

Example to add the registry entries:

;next line is not essential, but adds custom description, otherwise Context will be say "YourProgram"
RegWrite("HKCR\*\shell\YourProgram", "", 'REG_SZ', 'Your Program Desciption')
RegWrite("HKCR\*\shell\YourProgram\Command", "", 'REG_SZ', '"Your Proagram Path\YourProgram.exe" "%1"')oÝ÷ ØLZ^¡ûay.¬ú趦IÊâ¦Ö®¶­sdbb33c´6ÖDÆæU³ÒÒFVâW@¢b33c¶fÆRÒb33c´6ÖDÆæU³Ð·VæV66W76'Â'WBW6ær÷W"W×ÆP¤bfÆT6÷gV÷C²b33c¶fÆRgV÷C²ÂgV÷C¶3¢b3#µ&öw&ÒfÆW2b3#²gV÷C²ÂFVà ´fÆV6÷7V66VVFVBæB&WGW&æVBÂ÷"G'VP ×6t&÷3"Âb33µ7V66W72b33²Âb33c´fÆRfײgV÷C²v27V66W76gVÆÇgV÷C²fײ5$ÄbfײgV÷C²6÷VBFògV÷C²fײ&öw&ÔfÆW4F"Â2¤VÇ6P ´fÆV6÷fÆVBæB&WGW&æVBÂ÷"fÇ6P ×6t&÷3"Âb33´fÇW&Rb33²Âb33c´fÆRfײgV÷C²6÷VÆBæ÷B&RgV÷C²fײ5$ÄbfײgV÷C²6÷VBFògV÷C²fײ&öw&ÔfÆW4F"Â2¤VæD`

Share this post


Link to post
Share on other sites
Mat

Thanks alot that works great - any chance of an explanation into how it works?

how does the CMD fit in?

also

;uneccessary, but using your example

so i could simply write

If FileCopy ("$cmdline[1]", "c:\Program files\", 1) Then

etc.

Mdiesel

Share this post


Link to post
Share on other sites
Varian

Sorry for the delay. Yes, $CmdLine[1] holds the full path of the item being clicked. But You do not want to to put in in any kind of quotes within AutoIT..unless you are trying to pass the literal string to the command. Your Line should read:

If FileCopy ($CmdLine[1], "c:\Program files\", 1) Then

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.