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

C:\Windows\temp not deleted #159

Closed
matthias-schlimm opened this issue Dec 27, 2019 · 2 comments
Closed

C:\Windows\temp not deleted #159

matthias-schlimm opened this issue Dec 27, 2019 · 2 comments

Comments

@matthias-schlimm
Copy link
Collaborator

@matthias-schlimm matthias-schlimm commented Dec 27, 2019

I suspect it is due to the call in Preparation \ 97_PrepBISF_PRE_BaseImage.ps1
Line 725: Command = "Remove-BISFFolderAndContent ($ path)"

An “s” is missing when calling the function:
Line 725: Command = "Remove-BISFFolderAndContents -folder_path $ path"
(The first time I tried, I just added the missing letters, but it still didn't work. I then passed the parameter on explicitly).

For the "Remove-FolderAndContents" function from BISF.psm, I have also made the following adjustments in my version:

From line 3255:

Write-BISFFunctionName2Log -FunctionName ($ MyInvocation.MyCommand | ForEach-Object {$ _. Name}) # must be added at the beginning of each function
param (
[Parameters (Mandatory = $ true, Position = 1)] [String] $ folder path
)

changed in:

param (
[Parameters (Mandatory = $ true, Position = 1)] [String] $ folder path
)
Begin {
Write-BISFFunctionName2Log -FunctionName ($ MyInvocation.MyCommand | ForEach-Object {$ _. Name}) # must be added at the beginning of each function
Write-BISFlog -Msg "Delete files and subfolders from folder $ ($ folder_path)"
} #close begin

(also moved the param block to the beginning of the function).

@matthias-schlimm

This comment has been minimized.

Copy link
Collaborator Author

@matthias-schlimm matthias-schlimm commented Dec 27, 2019

Code Change as described above

@matthias-schlimm

This comment has been minimized.

Copy link
Collaborator Author

@matthias-schlimm matthias-schlimm commented Dec 28, 2019

tested and looks good
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.