Create registry key for context menu in System for a script

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
olllllliii
Pro Scripter
Posts: 60
Joined: Tue Dec 22, 2009 9:51 am
Location: Mannheim ( Germany )
Contact:

Create registry key for context menu in System for a script

Post by olllllliii » Wed Aug 22, 2012 3:57 am

Hello ,

i tryed to do following. ( Use windows 7 64 Bit )
----------------------------------
per hand i started regedit goto HKEY_CLASSES_ROOT\Directory\Background\shell
create the new empty key with the name Scriptstart
inside this key , create a new key with the name command
an give command the value %script_dir%\scriptname.scp
if i close regedit it apears in the context menue. So that i can start
the script with

I tryed following but it didnt work.

RegistryWriteKey>HKEY_CLASSES_ROOT,Directory\Background\shell,Scriptstart,command
RegistryWriteKey>HKEY_CLASSES_ROOT,Directory\Background\shell\Scriptstart,command,%SCRIPT_DIR%\hello-world.scp

Can someone help....

Kind Regards
Oliver
Oliver Hilger Mannheim
alias Olllllliii

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Aug 22, 2012 7:52 am

HKEY_CLASSES_ROOT requires administrator privileges for writing. So unless you are running Macro Scheduler as admin this will fail.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

olllllliii
Pro Scripter
Posts: 60
Joined: Tue Dec 22, 2009 9:51 am
Location: Mannheim ( Germany )
Contact:

Post by olllllliii » Thu Aug 23, 2012 2:33 am

Thank you Marcus ...

sometimes the solution is so near....
Oliver Hilger Mannheim
alias Olllllliii

User avatar
Grovkillen
Automation Wizard
Posts: 1024
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Create registry key for context menu in System for a scr

Post by Grovkillen » Fri Oct 28, 2016 9:16 am

I found this guide and thought I'd post it somewhere for others to read. Sorry for hijacking this thread.
Let>ME=%Script%

Running: 15.0.24
version history

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts