Matt

Matt

Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • Matt
    Participant
    Post count: 11

    What’s the FQ path? If it has spaces, you need to escape or double quote it.

    I can’t even figure out how to show the escape character because this forum uses it for /code function.

    • This reply was modified 2 weeks, 1 day ago by  Matt.
  • Matt
    Participant
    Post count: 11
    in reply to: Dynamic Uninstall #2340

    Simple, that function only gets certain values:
    UninstallSubkey
    ProductCode
    DisplayName
    DisplayVersion
    UninstallString
    InstallSource
    InstallLocation
    InstallDate
    Publisher
    Is64BitApplication

    The function would be best served by allowing input to include (partial) display name, specific reg value (quietuninstallstring here). This method also generated the Uninstall command for me so that I didn’t need to know switches. I put this into a function which I used in both preinstall and uninstall state. Also expanded it a little more to include logging…it’s much more effective now.

  • Matt
    Participant
    Post count: 11

    If the end goal is to throw a failure, you use exit-script -exitcode 2 <– or anything not a success. Put that wherever you want it to stop and you’re golden. If you’re looking to passthru exit codes from process, go see my last post here.

  • Matt
    Participant
    Post count: 11

    In all seriousness, I don’t know why they took something that works great natively and remade it to work…less…great, so I just use the native commands:
    Remove-Item -force (files) or remove-item -force -recurse (directories)

    Seems like wasted effort that could have been spent in other areas.

  • Matt
    Participant
    Post count: 11

    Sorry, from http://ss64.com/ps/syntax-esc.html:

    The PowerShell escape character is the grave-accent.

    Switch your single quotes at the beginning and end to double quotes. Then put the grave accent immediately followed by a double quote. Don’t use the + symbol.

    • This reply was modified 10 months ago by  Matt.
  • Matt
    Participant
    Post count: 11

    Escape the quotes. Put the symbol next to the 1 key in front of each double quote.

    Now I need to find the post that shows us kitties how to use the WP HTML editor effectively so I can show you exactly what you needed.

  • Matt
    Participant
    Post count: 11

    Dan,

    I use the following which works for me and is not as long or complicated as above:
    “Deploy-Application.exe” -deploymode silent -AllowRebootPassThru

    The code in-line that does passthru to SCCM is as follows:
    $RC = Execute-Process -Path “blahblah” -Parameters “blahblah” -WindowStyle ‘Hidden’ -IgnoreExitCodes “3” -PassThru
    if ($RC.ExitCode -eq “3”) {
    Exit-Script -ExitCode 3010
    }

    You use ignoreexistcode here so that 3 doesn’t trigger AppDeploy to report a failure but you also use the passthru to send it forward. At some point, you still have to tell the script to exit and return that code so in my case, I chose to convert it in-line to a 3010 rather than add it to the app object in SCCM.

  • Matt
    Participant
    Post count: 11

    Default is: The active console user. If no console user exists but users are logged in, such as on terminal servers, then the first logged-in non-console user.

    Multiple reasons:
    1. Wouldn’t I then need to relocate the license file to a non-admin directory first (rather than ccmcache)?
    2. I can now expand the above code to work with multiple active users.
    3. Doesn’t depend on task scheduler.

Viewing 8 posts - 1 through 8 (of 8 total)