Remakepkg - Convert installed packages back into installable archives

This is a script to convert a package that has already been installed, back into an installable package file. It takes modified files (as reported by pacman -Qqkk) into account, and will regenerate the mtree entries corresponding to those files, if the original package had an mtree.
I've been searching for an utility like this, and didn't find it. If I am entirely mistaken and such a thing does already exist, please point me in its direction. Thank you!
Why would I possibly want this?
The creation of this script was inspired by 2 incidents.
1. wine-silverlight takes about 2 hours to build from AUR on my desktop computer. The package file was automatically deleted after installation. And then I realised, my netbook has the same architecture, but the package file was already gone, so I had to build it again.
2. While troubleshooting an issue with font rendering, I had to flip between freetype2-infinality and freetype2 a few times to isolate the problem. It would have been nice if I only had to build freetype2-infinality from AUR once.
Limitations
This script is unable to guess information that is not present pacman's local database. For example, the .PKGINFO file produced by the script will not have any makepkgopt entries.
I also do not have a perfect understanding of pacman's package format, and you may encounter errors resulting from omissions or misunderstandings on my part, or changes to pacman.
Well, that's everything. I hope this helps someone!
AUR: https://aur.archlinux.org/packages/remakepkg/
Github: https://github.com/deciare/remakepkg
Last edited by Deciare (2014-03-19 00:14:43)

slithery wrote:
Deciare wrote:
Why would I possibly want this?
The creation of this script was inspired by 2 incidents.
1. wine-silverlight takes about 2 hours to build from AUR on my desktop computer. The package file was automatically deleted after installation. And then I realised, my netbook has the same architecture, but the package file was already gone, so I had to build it again.
2. While troubleshooting an issue with font rendering, I had to flip between freetype2-infinality and freetype2 a few times to isolate the problem. It would have been nice if I only had to build freetype2-infinality from AUR once
I just edit /etc/makepkg.conf and set the PKGDEST variable.
This way I always have a copy of my built packages in case I need to reinstall or use on a different machine.
Only issue with that is that the config files will be default. By using remakepkg or bacman it takes the existing config file and rolls it into the package.
**EDIT** Well actually, thats because I elect to have pacman ditch the config files whenever I remove something. I usually remove something with -Rcsn options a pay close attention to what it says it will remove..
Last edited by GSF1200S (2014-03-19 20:50:17)

Similar Messages

  • Can I convert a PDF back into a PUB file?

    Can I convert a PDF back into a PUB file?

    Use Acrobat XI (Pro or Standard) to export the PDF to Word.
    Use Calibre to bring the Word file into ePub.
    Be well...

  • Is there a way to convert outlined text back into live text?

    I have an Illustrator CS3 doc in which all text has been converted to outlines. (I wish I had an intelligent answer to the question of why I don't have the original doc with live text, but...) I remember seeing a post some time ago that explained how to change the outlines back into live text, which may have involved making a pdf or something, but I can't find that post anywhere in the Adobe forums. Does anyone know how to do this, if it can even be done? Thanks!

    I had to test it. Yes, you can use Acrobat Pro to OCR the text. First you'll need to rasterize the outlined text in AI (at 300dpi bitmap) and save as PDF. Then open in Acrobat and go to "Documents>OCR Text Recognition" to convert the image to text. Click "Edit" in the "Recognize Text dialog window and select "Formatted Text & Graphics" to view only the text in Acrobat. Save and re-open in AI. The text will be editable, but broken into individual words. You can cut multiple words to the clipboard then click with the text tool and paste, to merge the text into a contiguous sentence, but you'll lose the spaces. Exporting as text from Acrobat may be a better route.

  • Help! Convert iPhoto folder back into a package!

    I had to have my cloud backup company send me back a hard disk containing my iphoto library because my local copy was corrupted. When I received it today, the iPhoto library came back as a folder. It has everything in it, but it's viewed as a folder, not a package. So when I double click it, it doesn't open iPhoto. It's just treated like a folder.
    How do I make it back as a package?

    I doubt if you'll be able to restore your library to working order.  Keith's suggestion is worth trying but I'm afraid that all of the links between image files and database files are damaged beyond repair.
    The following will be able to get your photos back in a new library with the same event grouping as you had (but probably not the same Event names).
    Starting over from scratch with new library
    Start over with a new library and import the Originals (iPhoto 09 and earlier) or the Masters (iPhoto 11) folder from your original library as follows:
    1. Open the library folder and locate the Masters or Originals folder.
    2. Launch iPhoto with the Option key held down and, when asked, select the option to create a new library.
    3. Drag the subfolders of the Originals (iPhoto 09 and earlier) or the Masters (iPhoto 11) folder from the open iPhoto Library package into the open iPhoto window a few at a time.
    This will create a new library with the same Events (but not necessarily the same Event names) as the original library but will not keep the metadata, albums, books slideshows and other projects.
    Note:  your current library will be left untouched for further attempts at a fix if so desired.

  • Re-ripping an iDVD creation back into an archive file

    Hi,
    I created a DVD using iDVD, and have since lost the archived project file. I know I can rip the DVD's contents back onto my computer in case I want to re-burn another copy, but was wondering if there's a way to rip the DVD so that it can become an iDVD archive file where I could easily modify the file (change audio, modify titles etc).
    I'm guessing the answer is no, but maybe someone has figured out a way to do that. Thanks in advance.

    Hi, DannyG,
    You don't have to rip a DVD content to burn another copy. Just insert the burned DVD disk you have, and use Disk Utility (applications/utilities) to create a disk image file and then use that to burn more DVD disks. You will not lose any quality this way.
    The disk image file is a self-contained file that cannot be edited, but it makes a great backup and you do not have to save all the original media used in your iDVD project. You should be making disk images of all your iDVD projects...you do it from within the iDVD project selecting 'Save as Disk image' while you still have the iDVD project available.
    If you mean that you want to edit the media--photos, iMovies--used in a DVD that you have created, you can rip its contents, but you will lose some quality because the media has to be compressed when you burn it to DVD, has to be uncompressed to rip it to iMovie for editing, and then recompressed to burn to DVD again. But, if it is important to re-edit, you can extract the footage using Handbrake, Ripit or MPEG Streamclip. The first two you must purchase, Streamclip is free, but you may need to purchase Apple's Quicktime Component for $20.
    If, however, you mean that you might want to change some of the titles and audio of the iDVD project itself, not the media used in it, you would have to recreate the iDVD project. That data would not be extractable from the files within the project. If you no longer have the original media used in the project, you would then have to extract the media files as above and put those into the new iDVD project, and then create an archive file of that project.

  • Download Installed Packages for Re-installation

    I have managed to get what I consider my perfect Arch. What I would like to do is download all the packages I have installed, save them to either external hd or disc. How would I go about doing this?
    Also if and when I do a reinstallation how would I install those packages without having to do it one by one.
    Thanks

    that's because of --needed.
    generate the list, uninstall some shit, then cat the list to xargs
    you'll see what you just uninstalled as the targets.
    i.e. man pacman
    /edit:
    ┌─[ 11:53 ][ blue:~ ]
    └─> pacman -Qqe | grep -v "$(pacman -Qqm)" > temp.paclist
    ┌─[ 11:53 ][ blue:~ ]
    └─> cat temp.paclist | xargs sudo pacman -S --needed
    warning: abcde-2.3.99.7-1 is up to date -- skipping
    --//snip//--
    warning: downgrading package libtorrent (0.12.4-1 => 0.12.2-2)
    --//snip//--
    warning: downgrading package rtorrent (0.8.4-1 => 0.8.2-3)
    --//snip//--
    warning: zlib-1.2.3.3-3 is up to date -- skipping
    resolving dependencies...
    looking for inter-conflicts...
    Targets (2): libtorrent-0.12.2-2 rtorrent-0.8.2-3
    Total Download Size: 0.70 MB
    Total Installed Size: 2.01 MB
    Proceed with installation? [Y/n]
    Last edited by brisbin33 (2009-07-10 15:55:49)

  • Converting a table back into text used to be easy in pages, not any more.  Any suggestions?

    Used to be able to convert a table that came from a windows document into text only.  Now I cannot find where to do this within the new pages.  Have they dropped this useful tool or do I need to look further?

    Gone. Unfortunately.
    Best bet is to stay with Pages '09, and send feedback to Apple.

  • Converting Time Machine back into an External Hard Drive?

    before i got my macbook, i used my 320GB external hard drive on a windows XP-run computer. i transferred all my files to my new mac, before using it as my time machine drive.
    it's now incompatible with windows though.
    is there any way to either
    -allow my drive to be used with a windows XP computer?
    or
    -unassociate the drive with time machine, and revert it back to a plain old external hard drive?

    In order to use that old drive with Windows XP, I'd repartition it with the MBR option and format it as a Fat32 drive. Once you connect it to the WinXP machine you can also reformat the drive to NTFS for better performance and compatibility with XP.

  • Once I locate where the iPod back up is on my computer, how do I install it back into my iPod.

    I backed up my iPod to my computer before I synced it since I had a lot of songs that were uploaded from CDs from another computer that kicked the bucket. I could never add the songs from my new computer so I read to back up the iPod and then sync. Now I have located where the back up is, but need to know how to I guess, "reinstall," that back up to my computer's and ipod's iTunes playlists.
    Now, instead of 4,000 songs, I have 250. Is there another option if my back up plans are a no go?

    Some of the space could be taken up by the program files. It usually is gigs for the operating system to be on the computer. But If the photos are still there, try deleting them, emptying the trash, and checking the hard drive again. If it still says that the space isn't free I would back up the laptop and boot from recovery, erase the hard drive, and reinstall Mavericks and see if that takes care of it! Good luck!

  • Archsetup exitting with error. Install package step

    I set the packages I want (I need wireless capabilities) and when I go to the install packages step the installer exits with the errors
    cat: /tmp/aif/aif-pacman_installpkg-exit: No such file or directory
    rm: cannot remove '/tmp/air/aif-pacman_installpkg-ext': No such file or directory
    /usr/lib/aif/core/libs/lib-misc.sh: line 90: kill: Can't: arguments must be process or job IDs
    ERROR: Internal AIF error, the following call failed: wait_for pacman_installpkg
    Can't open input file in dialog_tailbox().. This should never happen
    I then try to rerun arch setup, but the process seems to be still active so when I go to redo my file partioning (which it says I have to redo again). It cant unmount my / partition.
    So I checked out fuser, and nothing came up, then I tried killall root. And still nothing. So I rebooted fresh and restarted and got the same situation again.
    Any suggestions? google sort of failed me...
    extra info:
    cdrom, netinstall, Wireless WPA connection
    edit2: ill try burning new cd.
    edit3: burning new cd with coreinstall failed. I tried it again (downloaded coreinstall instead of netinstall too) and the same thing happened.
    Last edited by Enders_Game (2011-09-18 03:25:25)

    OK so if anyone ever has these sorts of problems (everything breaking at once). Suggest they burn their cd at slower x value .
    fixed!
    Last edited by Enders_Game (2011-09-18 15:24:50)

  • Bring dvd back into imovie to re-edit?

    I made an imovie - successfully brought it into idvd - and burned a dvd. I showed it to my client and they wanted some changes. When I made the changes I saved a copy of the project (64 GB) which filled up my remaining hard drive space to capacity. I deleted the old movie to make room but the NEW movie (with my new edits) won't open (must not have fully saved properly...). So now I have nothing to work from. The only thing I can think of is to try to bring the .dv file back into imovie from the dvd I burned...will this work? Can I edit? Is it encrypted?

    You will need to convert the DVD back into a DV file for imovie.
    How can I edit MPEG or convert DVD or MPEG to DV
    http://www.sjoki.uta.fi/%7Eshmhav/SVCDon_a_Macintosh.html#edit_convertMPEG
    Using MPEG or DVD footage
    http://www.danslagle.com/mac/iMovie/tips_tricks/6010.shtml
    MPEG Streamclip
    http://www.alfanet.it/squared5/mpegstreamclip.html
    MPEG-2 Playback
    http://www.apple.com/quicktime/mpeg2/
    Sue

  • Converting a byte[] back to key problem

    I CAN create a key and convert the key to a byte array, then convert the array to a string(base 64):
    KeyGenerator generator = KeyGenerator.getInstance("DES");
    generator.init(new SecureRandom());
    key = generator.generateKey();
    byte[] keyBytes = key.getEncoded;
    BASE64Encoder encoder = new BASE64Encoder();
    String randomKey = encoder.encode(keyBytes);
    and I CAN save that string to a database, forget about it, then sometime later reload it and convert it to a byte array again:
    String loadedKey = "WhAt3Ver-It-I5" //from DB
    BASE64Decoder decoder = new BASE64Decoder();
    byte[] loadedKeyBytes = decoder.decodeBuffer(loadedKey);
    what I CAN'T do is convert the loadedKeyBytes back into the key of the same type as it was originally, enabling me to decrypt whatever that key originally encrypted.
    Does anyone know.
    I know I need to convert it to a KeySpec, I presume as:
    DESKeySpec keySpec = new DESKeySpec(loadedKeyBytes);
    this compiles correctly.... but how do i then recreate the key so i can use it for decryption.
    Once i've finished this test program I should be able to port it to my application.
    Many thanks in advance guys!
    Cheers!
    Relisys
    ================ CODE FOLLOWS ======================
    import java.io.*;
    import java.security.*;
    import java.security.spec.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import com.sun.crypto.provider.SunJCE;
    import sun.misc.*;
    public class SecPrescrip {
    public static void main(String[] args) throws Exception {
    // Create Key.
    Key key;
    KeyGenerator generator = KeyGenerator.getInstance("DES");
    generator.init(new SecureRandom());
    key = generator.generateKey();
    // Get a cipher object
    Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
    // Encrypt the input string:
    cipher.init(Cipher.ENCRYPT_MODE, key);
    String input = "Medicare Secure Prescription: 30 Tamazopan 200mg tablets. Dosage: 1 to be taken every 4 hours";
    System.out.println("Stage 1: ENCRYPT PRESCRIPTION WITH A RANDOM DES KEY");
    System.out.println("===================================================");
    System.out.println(" - Input Plain Text: "+input);
    System.out.println("");
    byte[] stringBytes = input.getBytes("UTF8");
    byte[] raw = cipher.doFinal(stringBytes);
    BASE64Encoder encoder = new BASE64Encoder();
    String ciphertext1 = encoder.encode(raw);
    System.out.println(" - Cipher Text: "+ciphertext1);
    System.out.println("");
    byte[] keybytes = key.getEncoded();
    String randomkey = encoder.encode(keybytes);
    System.out.println(" - Random Prescription Key: "+randomkey);
    System.out.println("");
    System.out.println("ENCRYPTION SUCESSFULL");
    System.out.println("");
    System.out.println("");
    System.out.println("Stage 2: ENCRYPT RANDOM KEY WITH PATIENT MEDICARE KEY");
    System.out.println("=====================================================");
    BASE64Decoder decoder = new BASE64Decoder();
    String passphrase = "ABCD1234efghIJ56"; //Patient Medicare Key
    System.out.println(" - Patient Medicare Key: "+passphrase);
    System.out.println("");
    System.out.println(" - Input Plain Text: "+randomkey);
    String algorithm = "PBEWithMD5AndDES";
    byte[] salt = new byte[8];
    int iteration = 20;
    KeySpec ks = new PBEKeySpec(passphrase.toCharArray());
    SecretKeyFactory skf = SecretKeyFactory.getInstance(algorithm);
    SecretKey key2 = skf.generateSecret(ks);
    byte[] input2 = decoder.decodeBuffer(randomkey);
    MessageDigest md = MessageDigest.getInstance("MD5");
    md.update(passphrase.getBytes());
    md.update(input2);
    byte[] digest = md.digest();
    System.arraycopy(digest, 0, salt, 0, 8);
    AlgorithmParameterSpec aps = new PBEParameterSpec(salt, iteration);
    cipher = Cipher.getInstance(algorithm);
    cipher.init(Cipher.ENCRYPT_MODE, key2, aps);
    byte[] outputFinalKey = cipher.doFinal(input2);
    String ciphertext2 = encoder.encode(outputFinalKey);
    String saltString = encoder.encode(salt);
    String encryptedCiphertext = saltString+ciphertext2;
    System.out.println("");
    System.out.println(" - Cipher Text (Final Prescription Key): "+ciphertext2);
    System.out.println("");
    System.out.println(" - Salt: "+saltString);
    System.out.println("");
    System.out.println(" - Full Encrypted Output: "+encryptedCiphertext);
    System.out.println("");
    System.out.println("ENCRYPTION SUCESSFULL");
    System.out.println("");
    System.out.println("");
    System.out.println("Stage 3: DECRYPT PRESCRIPTION KEY USING PATIENT MEDICARE KEY");
    System.out.println("============================================================");
    //NOT CHANGED String passphrase = "ABCD1234efghIJ56";
    System.out.println(" - Patient Medicare Key: "+passphrase);
    System.out.println("");
    System.out.println(" - Input Plain Text: "+ciphertext2);
    algorithm = "PBEWithMD5AndDES";
    salt = new byte[8];
    iteration = 20;
    ks = new PBEKeySpec(passphrase.toCharArray());
    skf = SecretKeyFactory.getInstance(algorithm);
    SecretKey key3 = skf.generateSecret(ks);
    //Load in the input bytes as if they had been loaded from an sql database or the like
    String saltIn = encryptedCiphertext.substring(0,12);
    String ciphertext3 = encryptedCiphertext.substring(12,encryptedCiphertext.length());
    byte[] saltArray = decoder.decodeBuffer(saltIn);
    byte[] ciphertextarray = decoder.decodeBuffer(ciphertext3);
    aps = new PBEParameterSpec(saltArray, iteration);
    cipher = Cipher.getInstance(algorithm);
    cipher.init(Cipher.DECRYPT_MODE, key3, aps);
    byte[] outputKey2 = cipher.doFinal(ciphertextarray);
    String plaintext2 = encoder.encode(outputKey2);
    System.out.println(" - Plain Text (Random Generated Key): "+plaintext2);
    System.out.println("");
    System.out.println("");
    System.out.println("ENCRYPTION SUCESSFULL");
    System.out.println("");
    System.out.println("");
    System.out.println("Stage 4: DECRYPT PRESCRIPTION KEY USING PATIENT MEDICARE KEY");
    System.out.println("============================================================");
    // The decrypter string plaintext should be the same as the BASE64 Encoded representation of the random DES string
    byte[] randomKeyFetched = decoder.decodeBuffer(plaintext2);
    generator = KeyGenerator.getInstance("DES");
    DESKeySpec keyspec = new DESKeySpec(randomKeyFetched);
    * Stuck here! Once the key is reformed it will be complete!
    }

    You need to use a SecretKeyFactory to convert the byte array back to a SecretKey to use in decryption. Continuing your example:
    SecretKeyFactory skf = SecretKeyFactory.getInstance("DES");
    DESKeySpec desKeySpec = new DESKeySpec(loadedKeyBytes);
    SecretKey sk = skf.generateSecret(desKeySpec);
    Use sk in the call to the Cipher init() function. (Note that you don't call KeyGenerator to restore a key from its bytes.)
    Incidently, if you're using ECB mode for encryption I don't think you need to worry about the Initialization Vector. However, if you're using CBC mode (which is the default DES mode for the default SunJCE provider), I believe you also have to make sure that the decryption system starts from the same Initialization Vector that was used for encryption. To deal with this, if 'cipher' is your encryption Cipher object, then you call
    byte bytIV[] = cipher.getIV();
    to get the 8-byte IV array. To decrypt, you need to call:
    IvParameterSpec iv = new IvParameterSpec(bytIV);
    This is an AlgorithmParameterSpec, and can be used as the third argument to the init() function for Cipher to set up decryption, e.g.
    Cipher cd = Cipher.getInstance("DES/ECB/PKCS5Padding");
    cd.init(Cipher.DECRYPT_MODE, sk, iv);
    I believe that CBC mode is more secure than ECB mode when you have more than 8 bytes of material to encode (e.g. use "DES/CBC/PKCS5Padding"
    when you create the Cipher objects).
    To simplify things a bit, you might just want to use a fixed 8-byte Initialization Vector by constructing a IvParameterSpec and using it for all DES encryption and decryption.
    The documentation on all of this is extraodinarily obscure.

  • Convert javadoc output back to java class.

    Hi All,
    I have the javadoc for a certain specification and would like to convert that to the java interface definition class. The generated source code would be used to generate the implementation class later.
    Do you know of any utility that converts javadoc html back into java source code?
    Thanks in advance,
    Piyush.

    Just use your browser's copy and past functions to cut the text out of the documentation and then paste it into a programming editor.
    Delete the text and add a couple of semi-colons and you are all set.

  • How can I convert the volume directory into a single file installer?

    How can I convert the volume directory into a single file installer? I would like to hide all the miscillaneous files that I don't care for and be able to have the installer double click a single file and have it automatically install.

    On the second prompt screen when prompted 'What kind of self-extracting Zip file file do you want to make?'
    Are you choosing the second option (self-extracting Zip file for software installation)?
    I have a word file that I created to help me remember - is there anyway to email it to you?

  • How to deal with "Error 1001. The specified service already exists" when install a service using installer package?

    Hi everybody,
    I wrote a "Class Library" project which is a service using Visual Stodio 2008 recently, then tried to use a Visual Studio 2008
    Setup Project to install it.
    Here is what I did for the "Class Library":
    1. Finish the program.cs, Service.cs
    2. Add Installer
    3. Change the serviceInstaller so that "StartType" to be Aotumatic
    4. Change the ServiceProcessInstaller2 so that "Account" to be LocalSystem
    5.
    6. Click in F5 (Start Debugging)
    Here is what I did for the Setup Project:
    1. Add the exe file built from the "Class Library" project to the Application Folder
    2. On the Custom Action Editor, add the exe file from 1 to Install and Commit
    3. Change the property of the project so that "RemovePreviousVersion" to be true
    4. Click on F6(Build Solution)
    Then I tried to run the msi file from the built of the Setup Project. Because I modified the two projects serveral times, I uninstalled the Class Library using "Control Panel->Add or Remove Programs" before I reinstall. Two things I notived:
    1. After unstall, the registry was not cleaned up about the installed program
    2. After several rounds install/uninstall, I got "Error 1001. The specified service already exists"
    My questions are:
    1. How to cleanup the registry when uninstall a program?
    2. How to deal with the "Error 1001. The specified service already exists"?
    3. Did I do anytbing wrong with the "Class Library" or the "Setup Project"?
    Thanks a lot!
    Helen

    Hi Simon, not a problem!
    I spent some more time on this and here are few more notes:
    it is called Major Upgrade, when you are installing new version of the product upon a previous one and
    MSI supports 2 strategies:
    Strategy 1. Install a new version and uninstall previous one. (Install a new version right upon previously installed version (file merging is performed based on dll version number) and the delete previously
    installed files)
    Strategy 2. Uninstall previous version and install a new one (Delete all previous files and install from scratch new files.)
    From the first look it seems that 1st strategy is weird and buggy. But, remember, MSI is great because it's transactional!!! That means that if once some of the phases (Installation, Uninstallation, Rollback, Comit) fails, your machine
    will be reverted to the previous state and it'll be still functional. 
    Let's consider both strategies:
    Consider you have installed product_v1.msi and you want to install product_v2.msi.
    Strategy 1
    1. MSI engine copies files from Product_v1 directory to TEMP directory
    2. MSI engine merges files based on the assembly version (between v1 and v2)
    3. Once merging is completed successfully it removes files in TEMP (RemoveExistingProducts  action triggers it) and you got product_v2 installed, otherwise if it fails MSI engine revert machine to V1 and copies previous files from TEMP.
    Strategy 2
    1. MSI engine tottaly removes all files from v1.
    2. MSI engine installs v2 files and if something goes wrong you cannot revert back, because RemoveExistingProducts  allready worked out and MSI doesn't have files to revert machine back
    I recommend to everybody to use Strategy 1 and leverage MSI transaction functionality. And you can set this strategies by defining sequence of RemoveExistingProducts action. See more info
    here.  So, I think it's not even a bug in VS as I said in the upper post it is default recommened behaviour.
    AND, you got "Error 1001. The specified service already exists"
    because if we follow Strategy 1 MSI engine tries to install Windows Service on top of the existing service and OF COURSE it fails MSI engine (StopServices, DeleteServices actions are executed before actual
    installation and  they look at ServiceControl table). In order to stop service first and delete them you have to fill ServiceContol table of the MSI (and then StopServices, DeleteServices actions will recognize what to they have to stop
    and delete), like this:
    *clip*clip*clip*
    ' see http://msdn.microsoft.com/en-us/library/windows/desktop/aa371634(v=vs.85).aspx for more info
    ' Update the Service Entry to stop and delete service while uninstalling
    query = "INSERT INTO ServiceControl (ServiceControl, Name, Event, Arguments, Wait, Component_) VALUES ('MAD_Service', 'Service name', '160', '', '1', '"
    + componentName + "')"
    Set view = database.OpenView(query)
    : CheckError
    view.Execute : CheckError
    ' Update the Service Entry to stop and delete service while installing
    query = "INSERT INTO ServiceControl (ServiceControl, Name, Event, Arguments, Wait, Component_) VALUES ('MAD2_Service', 'Service name', '10', '', '1', '"
    + componentName + "')"
    Set view = database.OpenView(query)
    : CheckError
    view.Execute : CheckError
    *clip*clip*clip*
    We can uninstall service first by following Strategy 2, but then we lose transactional support.
    So, Simon did I encourage you to change your code a bit?:)
    And, btw, if you don't want to change the strategy, please don't rely on SequenceID in MSI table, it can be change, you have to get the at the runtime.
    Hope it will help to everybody!
    See also more advanced explanation of how MSI works
    here.
    Truly yours, Marat

Maybe you are looking for