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.

Run a specific command for each user

Hi everyone,

I have this software to install: 3CX (v18).

No issue here, it is an MSI file.

The thing is for each user it needs to be provisioned with their specific configuration.

The provisioning can either be done by the user itself with few steps, that I know a lot of them are not going to be able to do without my help, or by running a specific command that changes with every user (at least there is a specific ID for each one of them).

Would anyone know I could achieve this with PDQ Deploy and PDQ Inventory?

Thanks

0

Comments

6 comments
Date Votes
  • Would it be possible to create another package to be deployed after the MSI installation and have that second package run as the logged on user instead of the default deployment user?

    0
  • Yes absolutely. But how can I tell, inside the package to use a command with variable 1 for computer 1, variable 2 for computer 2, etc?

    0
  • Similar to Mike's suggestion, your best bet might be to run the step/package as logged on user, and call for environment variables, like the ones below:

    %USERNAME%
    %COMPUTERNAME%
    %HOMEPATH%

    This website has a comprehensive list of them, and from personal experience, I've used variables in Command Line or PowerShell steps without issue, though I've never tried using ones that depend on the logged in user. You may have to experiment a bit on this one.

    0
  • To be more acurate, I have this command to run for each computer.

    3CXDesktopApp.exe tcx+app:HTTPS://IPADDRESS:5001/P/ID/[OTHER_ID]

     

    [OTHER_ID] is different for each computer, how can send this command, with the specific [OTHER_ID] each time?

    0
  • Okay, I can see why you're getting stuck then.

    The best way to accomplish this then might be via a small PowerShell script that employs variables; set the variable in a prior line, maybe do some math or string modifiers to arrive there if it's based on one of the native computer or user variables, then call that variable in your actual command.

    I'm afraid my PowerShell coding skills are quite limited so I'm not exactly sure how to accomplish that myself, but there's plenty of good resources online, and if you have some programming skill, the PowerShell ISE coding environment native to Windows 10 might be enough to help you fill in the blanks. Hopefully this helps, and good luck!

    1
  • Thank you Patrick H. This is helpful, I believe I can script something in powershell indeed, I just needed your great idea.

    Thanks again.

    0