Thanks for the information
This is what i got for script 1
; =========================================================================================== ; ; Script Information ; ; Title:Write Default Printer Registry setting to defaultprinter1.txt file ; Author: ; Description:Write Default Printer Registry setting to defaultprinter1.txt file ; ; ; =========================================================================================== ;Read value from the registry and place this in variable $defaultprinter
$defaultprinter = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\Currentversion\Windows", "Device")
If @ERROR = 0
? "Default printer: $defaultprinter"
EndIf
;Open file and write value $defaultprinter into txt file If Open(3, "H:\windows\defaultprinter1.txt",5)=0 $x = WriteLine(3, "$defaultprinter")
Else Beep ? "Failed to open file, error code: ["+ @ERROR + "]" EndIf
;Close File If Close(3) Beep ? "Error Closing file!" EndIf
ONE Problem, the script adds the information to the text file but it should overwrite the information in the text file. Any thoughts?
|