I am taking the liberty of raising this topic following the post (viewtopic.php?p=14558#p14558) that I had opened regarding the possible interaction with users when deploying a package with WAPT.
Unfortunately, although my command line calling an external PowerShell script and allowing a popup to be displayed to the user worked perfectly when testing locally with PyScripter, it was a completely different story when deploying the package via WAPT because nothing was displayed.
So I wanted to adapt this PowerShell script call using the function start_interactive_process as Simon had indicated, and I managed to build the following command line which works perfectly locally with PyScripter:
Code: Select all
notification_folder = makepath(basedir, "Notification")
for session_id in get_active_sessions():
popup=notification_folder + "\\PsExec.exe"
popup_command_exec="-s powershell.exe " + notification_folder + "\\ServiceUI.exe C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -NoLogo -Noprofile -WindowStyle Hidden -file " + notification_folder + "\\Notification.ps1 -config " + notification_folder + "\\upgrade.xml"
start_interactive_process(popup, popup_command_exec, session_id=session_id,minimize=True)

However, the directory in question is completely empty because it is used only occasionally and temporarily by the package, I think (I specify that all the necessary files are present in the package directory from the beginning).
My question is: is this phenomenon normal and what is the function start_interactive_process Is it capable of accessing files from the package's native directory?
Thanks in advance.
Fred
