Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostInstallScript path #15

Open
LarsBjerring opened this issue Mar 27, 2024 · 1 comment
Open

PostInstallScript path #15

LarsBjerring opened this issue Mar 27, 2024 · 1 comment

Comments

@LarsBjerring
Copy link

Thank you for writing the application. It' just what I need. However, I have few smaller issues.

When you put in a path for a PostInstallationScript Ex. "C:\myscripts\myapplication\script1.ps1". Then the script is copied to the package folder, but the install command will use the full path "-Postscript 'C:\myscripts\myapplication\script1.ps1'. I would expect the command to only have the script name as it's included in the package. I think this could be fixed by something like this:

#existing
$InstallCommandLine += " -Prescript '$($row.PreScriptInstall)'"

#new
$scriptname = split-path $row.PreScriptInstall -leaf
$InstallCommandLine += " -Prescript '$scriptname'"

--
The second problem I had was, that I need to copy a config file to the computer after the installation have completed. I would like to have the config file included in the package and not use an external file store. Would it be possible to have an option to specify files to include in the package? I know I could create the package manual.

@SorenLundt
Copy link
Owner

Hi Lars,
Ah yes, this may be an issue. I haven't used the pre and post script a lot, only implemented as it thought it would be useful.
I will try to implement the solution once I get a chance.

About your second issue,
That could be an idea to allow adding files into the package.
The easiest approach without any changes to the import scripts and GUI is that you simply add in your file into \Packages folder which i generated with the import, then manually run IntuneWinAppUtil.exe to generate the intunewin file.

It could be useful in the script or GUI, but I do think it's important to keep the solution simple and understandable,. Already I do feel there is a bit too many options and switches which quickly gets confusing 😁

Thanks for reaching out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants