Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Answered

Change repository location on multiple pre-existing packages

I got transferred to a new site, so I'm taking over for another tech. I started doing Pull deployments at my previous site, and wish to do the same here. There are hundreds of packages the previous tech created that reference a static local file path - C:\PDQ_Deploy\Local_Packages.

As I've been using packages, I've been updating the path to say "$(Repository)....". However, there are still hundreds, and I'd like to change them all in one command, if possible.

I can access the SQLite console, but my database-fu is not as good as I wish it was, and I'm sure I'd screw something up with the wrong command. I know I need to edit at least the PackageSteps table, but I'm not exactly sure how.

0

Comments

1 comment
Date Votes
  • OK, I figured out how to do it. After launching the SQLite Console (Be careful to replace C:\PDQ_Packages\LocalPackages with your current local-only path):

    UPDATE InstallSteps SET FileName = replace( Filename, 'C:\PDQ_Packages\LocalPackages', '$(Repository)' ) WHERE FileName LIKE 'C:\PDQ_Packages\LocalPackages\%';
    UPDATE InstallSteps SET Files = replace( Files, 'C:\PDQ_Packages\LocalPackages', '$(Repository)' ) WHERE Files LIKE 'C:\PDQ_Packages\LocalPackages\%';
    UPDATE FileCopySteps SET Source = replace( Source, 'C:\PDQ_Packages\LocalPackages', '$(Repository)' ) WHERE Source LIKE 'C:\PDQ_Packages\LocalPackages\%';
    .save Database2
    .quit
    

    Ensure PDQ Deploy is closed. Open an administrative Command Prompt / Powershell, and run:

    net stop "PDQ Deploy"
    net start "PDQ Deploy"
    

    After going back into PDQ Deploy, I could see 3 packages where the files could not be found (out of hundreds), and I noticed that I didn't want those packages anyways. Now, everything is pointing to a file server, making my PDQ install very portable.

    As well, please make sure you backup your database if you are unsure of what you're doing! By default, it is located at C:\ProgramData\Admin Arsenal\PDQ Deploy\Database.db. Copy it to another location before editing the database manually!

    0