Highlighted
Absent Member.
Absent Member.
874 views

Printer installs fail on XP

Hi Everyone,

I am trying to deploy machines through batch scripts and the iprintcmd to xp machines on our network. This is working great on our Win7 machines but the XP machines will not install, and instread get the error: "The specified username is invalid"

I have tracked it down and it appears the script is running as the System user (nt authority/system). This is also true on the win7 machines and works just fine.

Is there a reason it does not work on XP as a system user and is there a way around this?
0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Printer installs fail on XP

I've found this TID: Support | ?The iPrint client is not installed" and "Run as Administrator" messages

But.... you don't tell us what iPrint client you are using.

Give us some more details please. Thanks.

Cheers,
Laura Buckley

Views/comments expressed here are entirely my own.
If you find this post helpful, please show your appreciation and click on "Like" below...
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Printer installs fail on XP

Sorry, using latest client v05.86.00.

I don't think that article pertains as it is not running as Administrator, and I am not running it from the website. I am using a batch script to call the install command. That script is being run as the "System" account.

For now I am just re-writing the scripts to add themselves to runonce so they will run as the local user on next login.

Sample of batch script below:

rem command to install iprint
iprntcmd -a default "ipp://iprintserver.domain.com/ipp/M4HALL"


rem add reg keys to show batch file has been run
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Print - M4 Hall" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Print - M4 Hall" /v DisplayName /t REG_SZ /d "Print - M4 Hall" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Print - M4 Hall" /v DisplayVersion /t REG_SZ /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Print - M4 Hall" /v Publisher /t REG_SZ /d HMC /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Print - M4 Hall" /v InstallLocation /t REG_SZ /d C:\windows /f

rem check if machine is running XP and ifso copy batch file from temp directory to root of C: and add regkey for runonce
ver "| find "XP" > nul"
if 0 == 0 goto ver_xp
exit
:ver_xp
if not exist c:\printer.bat (copy "M4 Hall.bat" c:\printer.bat
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\runonce" /v printers /d c:\printer.bat /t reg_sz /f)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.