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

Install-Printer.ps1 refuse to run when inf file in a subfolder with spaces #60

Open
cliffzhu opened this issue Mar 9, 2023 · 2 comments

Comments

@cliffzhu
Copy link

cliffzhu commented Mar 9, 2023

Install-Printer.ps1 refuse to run when inf file in a subfolder's name with a space.

@GiraffDK
Copy link

GiraffDK commented May 6, 2024

I get the same error - I can see that it's the pnputil that is making the mess.

@cliffzhu did you come though with a working method?

@krilumino
Copy link

In the Install-Printer.ps1 I modified the $INFARGS to add quotes around the file path. This allows spaces to be used when referencing the .inf file.

Original version:
$INFARGS = @( "/add-driver" "$INFFile" )

My version:
$INFARGS = @( "/add-driver " + '"' + $INFFILE + '"' )

It may be a sloppy way of doing it, but it seems to work.

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

3 participants