Basti756 Posted November 2, 2012 Share Posted November 2, 2012 Hi, I made a script which installs an application and its dependencies. There are a few .reg files and a .msi file which I wanted to include in the script. Inlcuding the files with FileInstall() works, but they are kinda messed up when the compiled script is executed. It somehow looks like those files have been compiled to binary. Here's what one of the .reg files looks before compiling the script: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\VAG\\update\Columns\0000] "Item"="ProgDesc" "Name"="Name" "Section"="Name" "ColID"=dword:00000000 "Sort"=dword:00000001 "Width"=dword:000000f7 This is what the file looks when being extracted by FileInstall() (just a part of it): ÐÏࡱá > þÿ z þÿÿÿ € ÿ € ÿ € ÿ € ÿ € ÿ € ÿ € ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿ › , ! " # $ % & ' ( ) * + . - D / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C F þÿÿÿþÿÿÿG H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q s t u v w x y E ¢ | } ~ R o o t E n t r y ÿÿÿÿÿÿÿÿ „ À F àoËÐQÌ{ @ @HŒDðDrDhD7H ÿÿÿÿÿÿÿÿÿÿÿÿ O @HC5BæErE<H ÿÿÿÿ N @HBäExE(H ÿÿÿÿ M @HBäExE(;2D³D1BñE6H ÿÿÿÿ L @HC/B ÿÿÿÿÿÿÿÿÿÿÿÿ F V @HDñE ÿÿÿÿ D L @HRDöEäC¯;;B&F7BB4FhD&B ÿÿÿÿ ÿÿÿÿ = Œ @HB'C$H ÿÿÿÿÿÿÿÿÿÿÿÿ 3 @H–Eì;ìCh<¤E+H ÿÿÿÿÿÿÿÿÿÿÿÿ 7 | @HYEòDhE7G ÿÿÿÿ ÿÿÿÿ 4 ˜ @Hÿ?äCìAäE¬D1H ÿÿÿÿ ƒ Ð) @H?dA/B6H ÿÿÿÿÿÿÿÿ 1 T @HÊA0C±;;B&F7BB4FhD&B ÿÿÿÿÿÿÿÿ 0 0 @HÊAùEÎF¨AøE(?(E8B±A(H ÿÿÿÿ . T @HŠA7CrDBûE ÿÿÿÿÿÿÿÿÿÿÿÿ ' ¤ @HNEµD5H ÿÿÿÿ x @H?;òC8D±E ÿÿÿÿÿÿÿÿÿÿÿÿ @H??wElDj>²D/H ÿÿÿÿÿÿÿÿÿÿÿÿ r @H??wElDj;äE$H ÿÿÿÿ PÔ \WIPROPDriveQR:\WIPROPDriveRS:\WIPROPDriveST:\WIPROPDriveTU:\WIPROPDriveUV:\WIPROPDriveVW:\WIPROPDriveWX:\WIPROPDriveXY:\WIPROPDriveYZ:\WIPROPDriveZWICOMP00000001WIFEAT00000001New FeatureSourceDirTARGETDIR{E2C7F2EC-CFAA-437B-BC86-9B2F410D048C}WIRemoveTextFileRemoveTextFilePositionTextAltPositionTextRemovalTextWinINSTALL: Primary key, non-localized token.WinINSTALL: File name used for installation, may be localized. This may contain a "short name|long name" pair.WinINSTALL: Foreign key into the Directory table denoting the directory where the text file is.WinINSTALL: Primary text removal position enumeration.WinINSTALL: Alternate text removal position enumeration.WinINSTALL: Text to be removed.WinINSTALL: Text removal action enumeration.WinINSTALL: Foreign key into the Component table referencing component that controls the removal of the text.WITextFileTextFileInsertionTextWinINSTALL: Primary text installation position enumeration.WinINSTALL: Alternate text installation position enumeration.WinINSTALL: Text rner of the bounding rectangle of the control.Vertical coordinate of the upper left corner of the bounding rectangle of the control.The name of an action. The billboard is displayed during the progress messages received from this action.Name of the billboard.An external key to the Feature Table. The billboard is shown only if this feature is being installed.OrderingA positive integer. If there is more than one billboard corresponding to an action they will be shown in the order defined by this column.The unformatted binary data.Unique key identifying the binary data.The index into the File table. This must be an executable file.PathPathsA list of ; delimited paths that represent the paths to be searched for the import DLLS. The list is usually a list of properties each enclosed within square brackets [] .CheckBoxA named property to be tied to the item.The value string associated with the item.Optional AppID containing DCOM information for associated application (string GUID).optional argument for LocalServers.Class registration attributes.The CLSID of an OLE factory.Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.The numeric server context for this server. CLSCTX_xxxxFilename1;2;3Optional default inproc handler. Only optionally provided if Context=CLSCTX_LOCAL_SERVER. Typically "ole32.dll" or "mapi32.dll"Localized description for the Class.Required foreign key into the Feature Table, specifying the feature to validate or install The OS I'm using for compiling is Windows 7 SP1 x64 Link to comment Share on other sites More sharing options...
Basti756 Posted November 2, 2012 Author Share Posted November 2, 2012 The boardsoftware somehow messes with my code snippet. Here's a part of the mentioned result: ÐÏࡱá > þÿ z þÿÿÿ € ÿ € ÿ € ÿ € ÿ € ÿ € ÿ € ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿ › , ! " # $ % & ' ( ) * + . - D / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C F þÿÿÿþÿÿÿG H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q s t u v w x y E ¢ | } ~ R o o t E n t r y ÿÿÿÿÿÿÿÿ „ À F àoËÐQÌ{ @ @HŒDðDrDhD7H ÿÿÿÿÿÿÿÿÿÿÿÿ O @HC5BæErE<H ÿÿÿÿ N @HBäExE(H ÿÿÿÿ M @HBäExE(;2D³D1BñE6H ÿÿÿÿ L @HC/B ÿÿÿÿÿÿÿÿÿÿÿÿ F V @HDñE ÿÿÿÿ D L @HRDöEäC¯;;B&F7BB4FhD&B ÿÿÿÿ ÿÿÿÿ = Œ @HB'C$H ÿÿÿÿÿÿÿÿÿÿÿÿ 3 @H–Eì;ìCh<¤E+H ÿÿÿÿÿÿÿÿÿÿÿÿ 7 | @HYEòDhE7G ÿÿÿÿ ÿÿÿÿ 4 ˜ @Hÿ?äCìAäE¬D1H ÿÿÿÿ ƒ Ð) @H?dA/B6H ÿÿÿÿÿÿÿÿ 1 T @HÊA0C±;;B&F7BB4FhD&B ÿÿÿÿÿÿÿÿ 0 0 @HÊAùEÎF¨AøE(?(E8B±A(H ÿÿÿÿ . T @HŠA7CrDBûE ÿÿÿÿÿÿÿÿÿÿÿÿ ' ¤ @HNEµD5H ÿÿÿÿ x @H?;òC8D±E ÿÿÿÿÿÿÿÿÿÿÿÿ @H??wElDj>²D/H ÿÿÿÿÿÿÿÿÿÿÿÿ r @H??wElDj;äE$H ÿÿÿÿ PÔ WIPROPDriveQR:WIPROPDriveRS:WIPROPDriveST:WIPROPDriveTU:WIPROPDriveUV:WIPROPDriveVW:WIPROPDriveWX:WIPROPDriveXY:WIPROPDriveYZ:WIPROPDriveZWICOMP00000001WIFEAT00000001New FeatureSourceDirTARGETDIR{E2C7F2EC-CFAA-437B-BC86-9B2F410D048C}WIRemoveTextFileRemoveTextFilePositionTextAltPositionTextRemovalTextWinINSTALL: Primary key, non-localized token.WinINSTALL: File name used for installation, may be localized. This may contain a "short name|long name" pair.WinINSTALL: Foreign key into the Directory table denoting the directory where the text file is.WinINSTALL: Primary text removal position enumeration.WinINSTALL: Alternate text removal position enumeration.WinINSTALL: Text to be removed.WinINSTALL: Text removal action enumeration.WinINSTALL: Foreign key into the Component table referencing component that controls the removal of the text.WITextFileTextFileInsertionTextWinINSTALL: Primary text installation position enumeration.WinINSTALL: Alternate text installation position enumeration.WinINSTALL: Text rner of the bounding rectangle of the control.Vertical coordinate of the upper left corner of the bounding rectangle of the control.The name of an action. The billboard is displayed during the progress messages received from this action.Name of the billboard.An external key to the Feature Table. The billboard is shown only if this feature is being installed.OrderingA positive integer. If there is more than one billboard corresponding to an action they will be shown in the order defined by this column.The unformatted binary data.Unique key identifying the binary data.The index into the File table. This must be an executable file.PathPathsA list of ; delimited paths that represent the paths to be searched for the import DLLS. The list is usually a list of properties each enclosed within square brackets [] .CheckBoxA named property to be tied to the item.The value string associated with the item.Optional AppID containing DCOM information for associated application (string GUID).optional argument for LocalServers.Class registration attributes.The CLSID of an OLE factory.Required foreign key into the Component Table, specifying the component for which to return a path when called through LocateComponent.The numeric server context for this server. CLSCTX_xxxxFilename1;2;3Optional default inproc handler. Only optionally provided if Context=CLSCTX_LOCAL_SERVER. Typically "ole32.dll" or "mapi32.dll"Localized description for the Class.Required foreign key into the Feature Table, specifying the feature to validate or install Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 2, 2012 Moderators Share Posted November 2, 2012 Ok, not sure if it is the forum or what you're posting, but your posts are a mess. Can you please post only the code for your script so we can take a look? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
abberration Posted November 2, 2012 Share Posted November 2, 2012 Instead of extracting registry files, why not integrate them into your script with RegWrite. Example: RegWrite("HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeVAGupdateColumns0000","Item","REG_SZ",'ProgDesc') RegWrite("HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeVAGupdateColumns0000","Name","REG_SZ",'Name') RegWrite("HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeVAGupdateColumns0000","Section","REG_SZ",'Name') RegWrite("HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeVAGupdateColumns0000","ColID","REG_DWORD",'00000000') RegWrite("HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeVAGupdateColumns0000","Sort","REG_DWORD",'00000001') RegWrite("HKEY_LOCAL_MACHINESOFTWAREWOW6432NodeVAGupdateColumns0000","Width","REG_DWORD",'000000f7') Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
careca Posted November 2, 2012 Share Posted November 2, 2012 Now imagine it was a really big file, with lots of keys, what would you do? Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
BrewManNH Posted November 2, 2012 Share Posted November 2, 2012 I'd do the same thing, make them RegWrites and use error checking to assure that they've been imported ok. Using a .reg file you don't have that kind of granular control over the process. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
abberration Posted November 2, 2012 Share Posted November 2, 2012 Now imagine it was a really big file, with lots of keys, what would you do? A while back, I found a script on this forum called Reg2Au3. Use it to convert the reg files to au3 files. Easy peasy. Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
Basti756 Posted November 3, 2012 Author Share Posted November 3, 2012 (edited) First of all sorry for the messed up posts.I know about the registry functions but integrating the files within the script would have saved me a lot of work. That was before I knew about Reg2Au3 .There is also an answer file for a unattended Oracle Client installation which I wanted to be integrated (which gets messed up too BTW) but I think I'll rather use AutoIt's native functions.Back to topic: Did you experience this behavior of FileInstall()?Here's what I did:using FileInstall() to integrate some files <- OKfiles being extracted when running the script <- OKfile content after they've been extracted <- NOKThe strange thing is I integrated 3 REG files, the Oracle answer file and a small MSI file. After they'd been extracted, they were all the same size (around 855kb) and looking at them with a text editor would show what I wrote in my second post. I'm using Windows Server 2008 R2 SP1 (which is a 64Bit OS) for compiling. Could that be the reason?EDIT:This is embarrassing now... the issues I had with FileInstall() turned out to be one of those copy-paste-errors. Here's what I did:FileInstall("C:some.msi",@TempDir & "some.msi")I needed a couple of files included so I copied and pasted this line a few times and changed the target path... not the source:FileInstall("C:some.msi",@TempDir & "some.msi") FileInstall("C:some.msi",@TempDir & "first.reg") FileInstall("C:some.msi",@TempDir & "second.reg")No wonder that the extracted files were totally messed. Thanks anyways, Bastian Edited November 3, 2012 by Basti756 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 5, 2012 Moderators Share Posted November 5, 2012 Glad you resolved your issue Basti756. Those copy and paste errors will get you every time. I remember when I first started C#, the instructor told us never to copy and paste, because it would cause us more headaches than anything else. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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