copyleft Posted July 16, 2006 Share Posted July 16, 2006 In the example below, I'm not sure where the quote marks end and the commas would go using the regwrite command. Is there an autoit command to execute REGEDIT /S for this registry file??? REGEDIT4 [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}] "NeverShowExt"="" [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}\InProcServer32] @="E:\\XP\\SYSTEM32\\SENDMAIL.DLL" "ThreadingModel"="Apartment" [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}\DefaultIcon] @="E:\\XP\\explorer.exe,3" [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}\shellex] [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}\shellex\DropHandler] @="{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}" Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 17, 2006 Share Posted July 17, 2006 In the example below, I'm not sure where the quote marks end and the commas would go using the regwrite command. Is there an autoit command to execute REGEDIT /S for this registry file??? REGEDIT4 [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}] "NeverShowExt"="" [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}\InProcServer32] @="E:\\XP\\SYSTEM32\\SENDMAIL.DLL" "ThreadingModel"="Apartment" [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}\DefaultIcon] @="E:\\XP\\explorer.exe,3" [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}\shellex] [HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}\shellex\DropHandler] @="{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}" If you want to kick off a CMD shell to run REGEDIT use Run(): Run(@CmdSpec & " /c REGEDIT /S C:\MyDir\MyFile.reg", @TempDir, @SW_Show) If you want AutoIT to write the values use RegWrite(): $RegKey = "HKEY_CLASSES_ROOT\CLSID\{9E56BE61-C50F-11CF-9A2C-00A0C90A90CE}" RegWrite($RegKey, "NeverShowExt", "") Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Briegel Posted July 17, 2006 Share Posted July 17, 2006 Little penguine error ... Run(@CmdSpec & " /c REGEDIT /S C:\MyDir\MyFile.reg", @TempDir, @SW_Show)This will work better. Run(@ComSpec & " /c REGEDIT /S C:\MyDir\MyFile.reg", @TempDir, @SW_Show)oÝ÷ Ú«¨µâ¢}ý¶IèÃZ¶Øh±ê®¢ Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 17, 2006 Share Posted July 17, 2006 (edited) Little penguine error ... This will work better. Run(@ComSpec & " /c REGEDIT /S C:\MyDir\MyFile.reg", @TempDir, @SW_Show)oÝ÷ Ûú®¢×¢*º`¶«¨µíýßÙj{-äjwZÒÉ.«Þ¶^j÷¢µ¹ZF®¶se&Vuw&FRgV÷C´´Uô4Ä54U5õ$ôõBb3#´4Å4Bb3#·³SSd$ScÔ3SbÓ4bÓ$2Ó34WÒb3#·6VÆÆWb3#´G&÷æFÆW"gV÷C²ÂgV÷C²gV÷C²ÂgV÷Cµ$Tuõ5¢gV÷C²ÂgV÷C·³SSd$ScÔ3SbÓ4bÓ$2Ó34WÒgV÷C²oÝ÷ Ûú®¢×ëmÂax,~º&Ê«{¦¦Wµªê-JÖ§uªÝ)쪺fy©ìªê-uçÚº[jºp'!Á«0«H槵¦è½íbqâ,r·°yÛ©jweyûhºÛay It still remains untested though, because I don't routinely have Windows loaded. So take my comment about defaulting the Type as "" with a grain of salt... Edit: MHz comment below makes me think I was wrong about being able to default the type on a pre-existing value (and he would certainly know better than I). So I've tweake the code above with REG_SZ type in all cases. Thanks for the correction. Edited July 17, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
MHz Posted July 17, 2006 Share Posted July 17, 2006 (edited) It still remains untested though, because I don't routinely have Windows loaded. So YMMV. "Type" parameter seems to be empty for some reason? Edit:I see your grain of salt. Perhaps "REG_SZ" would do as they are all simple string data items. Edited July 17, 2006 by MHz Link to comment Share on other sites More sharing options...
copyleft Posted July 17, 2006 Author Share Posted July 17, 2006 Wow, thanks to all for the help. 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