Sign in to follow this  
Followers 0
theguy0000

what do i do with the registry

7 posts in this topic

#1 ·  Posted (edited)

lets say want a new extension called .abc. I want it to open with notepad, and th title should be "Alphabetical file". and I want it all automatic. what do i do with the registry to do that? and how do i do it with autoit?

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites



Check out this Post



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

ok, that pushed me in the right direction, but what values do what?


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

use explorer and goto tools>folder options>file types

then create a new one.and set the default action to open notepad.exe in the system32\ direcotory


[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

i know how to do that, but i want this to be automatic.

I think i got it...kind of.

so i create HKEY_CLASSES_ROOT\.abc with the "(default)" value to "abcfile" and the "Content Type" value to "text".

Then, I create HKEY_CLASSSES_ROOT\abcfile with the "(default)" value to "Alphabetical file"

what am i missing here?

what would HKEY_CLASSES_ROOT\.abc\PersistentHandley and HKEY_CLASSES_ROOT\.abc\ShellNew do? an HKEY_CLASSES_ROOT\abcfile\DefaultIcon

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

ok, I came up with this code, is there anything wrong with it?

Const $cTwoDir = @ProgramFilesDir & "\cTwo v1"
DirCreate ( $cTwoDir )
FileCopy ( "cTwo.ico", $cTwoDir & "\cTwo.ico", 1 )
FileCopy ( "compile.exe", $cTwoDir & "\compile.exe", 1 )
TrayTip ( "ct1 Installation", "Installation will now update your registry.", 5 )
Sleep ( 5000 )
TrayTip ( "", "clear", 1 )
RegWrite ( "HKEY_CLASSES_ROOT\.ct1", "REG_SZ", "(default)", "ct1Script" )
RegWrite ( "HKEY_CLASSES_ROOT\ct1Script", "REG_SZ", "(default)", "cTwo v1 Script" )
RegWrite ( "HKEY_CLASSES_ROOT\ct1Script\DefaultIcon", "REG_SZ", "(default)", $cTwoDir & "\cTwo.ico" )
RegWrite ( "HKEY_CLASSES_ROOT\ct1Script\shell", "REG_SZ", "(default)", "compile" )
RegWrite ( "HKEY_CLASSES_ROOT\ct1Script\shell\edit", "REG_SZ", "(default)", "Edit Script" )
RegWRite ( "HKEY_CLASSES_ROOT\ct1Script\shell\edit\command", "REG_SZ", "(default)", "%SystemRoot%\notepad.exe %1" )
RegWrite ( "HKEY_CLASSES_ROOT\ct1Script\shell\compile", "REG_SZ", "(default)", "Compile Script" )
RegWrite ( "HKEY_CLASSES_ROOT\ct1Script\shell\compile\command", "REG_SZ", "(default)", $cTwoDir & "\compile.exe %1" )
MsgBox ( 64, "Information", "cTwo was successfully installed." )

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Your mentionings of "(default)" should be empty, i.e. "". Also, you may want to confirm that you have the correct argument order for RegWrite() (I'm pretty sure that the data type comes immediately before the data value).

Other than that, I don't see any obvious problems with your code.

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