Jump to content

what do i do with the registry


Recommended Posts

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

Link to comment
Share on other sites

Check out this Post


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

Link to comment
Share on other sites

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

Link to comment
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

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...