"The system cannot find the file specified" error in /etc/profile

Patrick J. LoPresti patl@users.sourceforge.net
Wed Aug 20 19:37:00 GMT 2003


On a newly built Windows XP system with no printers configured, the
registry key:

  HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device

...does not exist.  This causes /etc/profile to emit this message
every time it runs:

  Error (2): The system cannot find the file specified.

One possible fix is appended.

 - Pat

--- profile.orig	2003-08-20 15:01:13.000000000 -0400
+++ profile	2003-08-20 15:06:27.000000000 -0400
@@ -123,7 +123,7 @@
 # Define default printer
 case "`uname -s`" in
 CYGWIN_NT-*)
-  PRINTER="`regtool get '\user\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device' | 
+  PRINTER="`regtool -q get '\user\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device' | 
     sed 's/,.*$//'`"
   ;;
 CYGWIN_9?-*)

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list