1 Replies - 1884 Views - Last Post: 11 January 2012 - 04:48 PM Rate Topic: -----

#1 Killike  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 11-January 12

windows 7 batch file error 0x00000c

Posted 11 January 2012 - 11:56 AM

rundll32 printui.dll,PrintUIEntry /if /b "NWEmbosser" /f %windir%\inf\ntprint.inf /r "lpt1:" /m "Generic / Text Only"
rundll32 printui.dll,PrintUIEntry /Sr /n NWEmbosser /a "%userprofile%\My Documents\Nemeth Worksheets\paper.dat"
rundll32 printui.dll,PrintUIEntry /Sr /n NWEmbosser /a "%userprofile%\My Documents\Nemeth Worksheets\port.dat"



This batch file is to run in combination with an installer for one of my programs to creates a generic printer called NWEmbosser. for the first line

second line loads a .dat file that changes the paper length

Third line is .dat file that changes the spooler

This works on windows xp and the only issue was a timing issue on windows xp

windows 7 gives error message 0x0000c can not find exe and it still make the generic printer before error message

Is This A Good Question/Topic? 0
  • +

Replies To: windows 7 batch file error 0x00000c

#2 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 856
  • View blog
  • Posts: 2,246
  • Joined: 28-March 11

Re: windows 7 batch file error 0x00000c

Posted 11 January 2012 - 04:48 PM

Are those the correct paths to paper.dat and port.dat?

Also, you are missing a flag after the .dat files. When you use the /Sr it requires a flag so the OS knows what to change, use one of the following letters/numbers.

Quote

2 PRINTER_INFO_2
7 PRINTER_INFO_7
c Color Profile
d PrinterData
s Security descriptor
g Global DevMode
m Minimal settings
u User DevMode
r Resolve name conflicts
f Force name
p Resolve port

If this still does not work, remember, Windows 6 is NOT like XP, try running the batch file as Admin, since normal users cannot add devices.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1