-
Notifications
You must be signed in to change notification settings - Fork 250
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
Install-Printer.ps1 Suddenly not working #75
Comments
What is the path of the .inf file, relative to the directory where install-printer.ps1 (or pnputil) is being called from? |
Everything is in the root of the intunewim. |
This is generated by powershell when start-process isn't able to find an executable. It seems like it isn't finding pnputil.exe when it tries to start the process. Does your $env:path contain "C:\windows\system32"? Consider adding 'write-log $env:path' to install-printer.ps1 before it tries to launch pnputil, so you know what's in it under the executing user's context (should be SYSTEM when run as device from Intune apps). Does it work before packaging the .intunewin? What's the full powershell command calling install-printer.ps1?
|
Running the script in its folder that gets packed into the wim. Runs fine the only thing i have noticed has started happening is it being up a box to trust the pusblisher of then driver. Something seems to have change as if i upload a know working intunewim it no longer works and throws the cant find file path error above. So maybe its something with how the intunewim is getting unpacked for new intunewims only. |
Have deployed many of printers with this script but myself and anther coleege are having a issue with the script now where it produces this in the log file
##################################
<time="15:29:04.648 570" date="06-28-2024">
##################################
Install Printer using the following values...
Port Name: IP_10.86.1.53
Printer IP: 10.86.1.53
Printer Name: Unley - Sharp MX-3070V
Driver Name: SHARP MX-3070V PCL6
INF File: su0emenu.inf
<Staging Driver to Windows Driver Store using INF "su0emenu.inf"> <time="15:29:04.827 570" date="06-28-2024">
<Running command: Start-Process pnputil.exe -ArgumentList /add-driver su0emenu.inf -wait -passthru> <time="15:29:04.849 570" date="06-28-2024">
<time="15:29:04.970 570" date="06-28-2024">
<System.InvalidOperationException: This command cannot be run due to the error: The system cannot find the file specified.
at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)> <time="15:29:04.995 570" date="06-28-2024">
<time="15:29:05.079 570" date="06-28-2024">
and this in the event log.
![image](https://private-user-images.githubusercontent.com/13410224/344059270-8b0cbf4f-f2a3-430b-8d5a-4c28f39f8a34.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4ODA4OTIsIm5iZiI6MTczODg4MDU5MiwicGF0aCI6Ii8xMzQxMDIyNC8zNDQwNTkyNzAtOGIwY2JmNGYtZjJhMy00MzBiLThkNWEtNGMyOGYzOWY4YTM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA2VDIyMjMxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwNDU3YTBjMGE0N2NjYjhjNjRiOWRiN2Q0MzhjYjgxNmRkNzIzMGIxMGM5YjdmODc3ODJlZmUzYzgxNDJkNDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.fk-WO-nEYtocVeTXKHSdVWKYVeQ0UZkh7SERTwCY-DY)
It seems that the install cant find the INF file but i have checked and even decrypted the intunewin to check and the file is in there. Anyone else seen this it seems like an issue with intune deployment in general but posting there to see if anyone is able to assist.
Thank you,
J
The text was updated successfully, but these errors were encountered: