Jump to content

delnic

Member
  • Posts

    1
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    New Zealand

About delnic

delnic's Achievements

0

Reputation

  1. I've found a nifty way of creating a logon script that appends a line of text (or however many lines) to a pre-existing file (i.e. services file in etc folder) This can be put into the logon folder of a GPO to ensure the line is appended once only on logon, and never again @ echo off SETLOCAL ENABLEDELAYEDEXPANSION IF EXIST "c:\done.txt" ( goto exit ) ELSE ( echo test test test 1 2 3 4 5 >> c:\test.txt ) ( echo done > c:\done.txt ) :exit This will check for the "done.txt: file, if its not there, it will add the desired text to the required file, then drop a file to say its done. On next logon, the logon script exits as it finds the check file Easy as pie... If anyone has an easier way to do this please let me know Thanks Note the c:\test.txt should already exist
×
×
  • Create New...