From: "Fran >" <<fran>
| Can you paste a sample of the script? (please?)
|
| That sounds like a plan. I tried that copy approach manually but to
| the All Users account and that did nothing

But to be fair I didn't
| try that using a script to the logon user's account. Does this just
| fire once? If so, how do you control when it fires?
|
| -Fran-
The idea of a Logon Script is that it is executed each time the user logs onto the Domain
(NT4 or AD). Since every user has to login to the server to map drive letters, to push
software HotFixes and to update anti virus software signatures, it is also a good place to
update user profiles.
The following script snippet uses the Kixtart script interpreter [
http://kixtart.org,
Kixtart is CareWare ]
Note: The News Client will wrap script lines !
;Update Counters
;----------------------------------------
;$rev11 = Certificate Store updates
;$rev12 = User registry Updates
;$rev13 = Profile Icon updates
;----------------------------------------
$rev11=10
$rev12=12
$rev13=7
;-------------------------------------------------------
; Update User Certificate store
;-------------------------------------------------------
if exist ("%USERPROFILE%\PMO_CERT.$rev11")=0 and ($CALSMACHINE="Y")=1
;Command(s) to install *.CER Certificates
shell 'x:\certmgr -add -c "N:\SWPC\Sym-Root.cer" -s -r localMachine root'
shell 'x:\certmgr -add -c "N:\SWPC\JDSCA.cer" -s -r localMachine root'
shell '"N:\SWPC\Corp Certificate\InstallRoot.exe" -s'
del "%USERPROFILE%\PMO_CERT.*"
shell '%comspec% /c ipconfig >"%USERPROFILE%\PMO_CERT.$rev11"'
endif
;-------------------------------------------------------
; XP User Registry FX
;-------------------------------------------------------
if exist (" %USERPROFILE%\XP-USERREG.$rev12 ")=0 and ($OS="WINNT51")=1
shell 'regedit /s "$update\XP.reg"'
del "%USERPROFILE%\XP-USERREG.*"
shell '%comspec% /c ipconfig >"%USERPROFILE%\XP-USERREG.$rev12"'
endif
;-------------------------------------------
; Associate .SWF to IE
;-------------------------------------------
if exist ("%windir%\Flash-to-IE1.txt")=0
shell 'regedit /s "$update\SWF-Flash.reg"'
shell '%comspec% /c ipconfig >"%windir%\Flash-to-IE1.txt"'
endif
;-------------------------------------------
; Update User Profile
;-------------------------------------------
if exist ("%USERPROFILE%\USR_ICONS.$rev13")=0
copy "n:\user updates\icons\desktop\*.lnk" "%USERPROFILE%\desktop"
copy "n:\user updates\icons\QL\Form Flow Filler.lnk" "%USERPROFILE%\Application
Data\Microsoft\Internet Explorer\Quick Launch"
copy "n:\user updates\icons\QL\Adobe Acrobat 7.lnk" "%USERPROFILE%\Application
Data\Microsoft\Internet Explorer\Quick Launch"
del "%USERPROFILE%\USR_ICONS.*"
shell '%comspec% /c ipconfig >"%USERPROFILE%\USR_ICONS.$rev13"
endif
So an update is ONLY perforned once when required, a counter is used such as $rev13=7 The
script looks for the presence of a "USR_ICONS.xxx" { where xxx is the current revision
number. }, [see the below script example line #1] in this example; USR_ICONS.7 in the user's
profile. If the file exists then the update has already has been performed. If the file
does not exist such as; USR_ICONS.6 then the update will be performed. After the update is
perforned the update file is deleted by the below script example line #3
Then a new update file is created with the counter number of the revision. For simplicity I
use file redirection. I'll call the Command Prompt Interpreter (CMD.EXE) and run the
IPCONFIG command and redirect its output to the update counter file using the below script
example line #4
The next time an update needs to be performed, one would edit the script and increment the
counter such as; $rev13=8
If the admin. needs to force the update, just delete the counter file as in the exmple below
deleting the file
USR_ICONS.xxx { where xxx is the current revision number. }
1 -if exist ("%USERPROFILE%\USR_ICONS.$rev13")=0
2 - ;do function
3 - del "%USERPROFILE%\USR_ICONS.*"
4 - shell '%comspec% /c ipconfig >" %USERPROFILE%\USR_ICONS.$rev13"
5 -endif
This is how I check to see if an update has been done. Another way is to create a Registry
key either in HKLM or HKCU and set a number then check the number in that Registry key when
performing the next update. I prefer writing a disk file with the extension being the
counter number because it is easier to find and delete a file than work with the Registry.