Joeteck
Retired
- Joined
- Oct 5, 2001
- Location
- Long Island
Ok, I recently moved to Windows 7 and I'm starting to notice functions that were once in XP are not removed in Windows 7 (Messenger service). I had in XP a scheduled task that printed a text file to my printer every morning @ 9AM. Within my login script it logged the username, machine name, time and date to a file on the server. Works very well, however I have to do print this manually now as the script is now broken. I needed to track users and what workstations they logged into every day and or more than once a day, and multiple workstations if they did...
The command was this: %systemRoot%\notepad.exe /p "\\Dc2003\logs\LogOns.txt"
I get this error: Unsupported personality: PCL, which means it does not support DOS, however its a windows program, with DOS switches to print.
I changed it to %systemRoot%\write.exe /p "\\Dc2003\logs\LogOns.txt" to be more compatible with Windows 7
and I still get the same error.
Any help in this matter would be great.
Just in case you want the code, here is is:
code---------
:Logging
If Exist "\\<SERVERNAME>\share\LogOns.txt" GoTo START
Echo Log File > "\\<servername>\share\LogOns.txt"
:START
Echo %USERNAME%, %COMPUTERNAME%, %Date%, %Time% >> "\\<SERVERNAME>\share\LogOns.txt"
Netstat -an |find "3389" |find /I "established" >> "\\<SERVERNAME>\share\LogOns.txt"
--------code
The command was this: %systemRoot%\notepad.exe /p "\\Dc2003\logs\LogOns.txt"
I get this error: Unsupported personality: PCL, which means it does not support DOS, however its a windows program, with DOS switches to print.
I changed it to %systemRoot%\write.exe /p "\\Dc2003\logs\LogOns.txt" to be more compatible with Windows 7
and I still get the same error.
Any help in this matter would be great.
Just in case you want the code, here is is:
code---------
:Logging
If Exist "\\<SERVERNAME>\share\LogOns.txt" GoTo START
Echo Log File > "\\<servername>\share\LogOns.txt"
:START
Echo %USERNAME%, %COMPUTERNAME%, %Date%, %Time% >> "\\<SERVERNAME>\share\LogOns.txt"
Netstat -an |find "3389" |find /I "established" >> "\\<SERVERNAME>\share\LogOns.txt"
--------code
Last edited: