I have started using the great toolkit but have an strange problem.
I created a simple package that copies a file to a directory.
And if a run the application with following parameters i SCCM:
“Deploy-Application.exe” -DeploymentType “Install” -DeployMode “Silent”
The process executes my copy command, but the executable just keeps on running.
The application package is deployed as required so it’s executed by the system account on server operating systems.
I have set ballontip to false in the xml config, it doesn’t seem to have helped. (I thought that it would confuse it when executed in system context)
If I manually run the exe, or with psexec with system account, then it finishes.
Only when deploying via SCCM it’s stuck.
Does anyone have an idea why this happens?
It seems that it didn’t like the compress log files setting I set to true on the config xml.
Check the log in c:\windows\logs\software
You may need to trap the exit code from the cmdlet you are running and return it. It needs to be exit code 0. Otherwise, you’ll need to handle it appropriately with Exit-Script. If you are using an application, make sure that your detection method is looking for the file you are copying properly. A legacy package may be more suitable for your use though because it can be set to re-run.
Or a simple “cmd /c copy filename.txt %foldername%” application or package.
That is still very weird, what powershell version are you running?
offtopic, you can just use “Deploy-application.exe” (so no parameters added). By default it installs and is silent. Only for uninstall you need to add the parameter, and the “-DeploymentType” is also not needed.