theguy0000 Posted October 2, 2005 Share Posted October 2, 2005 (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 October 2, 2005 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 More sharing options...
BigDod Posted October 2, 2005 Share Posted October 2, 2005 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 More sharing options...
theguy0000 Posted October 2, 2005 Author Share Posted October 2, 2005 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 Link to comment Share on other sites More sharing options...
B3TA_SCR1PT3R Posted October 2, 2005 Share Posted October 2, 2005 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] Link to comment Share on other sites More sharing options...
theguy0000 Posted October 2, 2005 Author Share Posted October 2, 2005 (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 October 2, 2005 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 More sharing options...
theguy0000 Posted October 2, 2005 Author Share Posted October 2, 2005 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 More sharing options...
LxP Posted October 3, 2005 Share Posted October 3, 2005 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 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