Hi and 'welcome,
The logon script needs to do the following, in this order:
1) Check the HKEY_CURRENT_USER hive for a value that you specify. Example:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
Value: SMScriptRun
DWord value
1 = Script has been run previously.
2) If the script does not find SMScriptRun, then it executes REGEDIT with
the /S switch to import your REG file.
3) Next, it executes a small snippet of WMI code to end process on
Explorer.exe and restart it. This refreshes the user's settings, desktop,
taskbar and etc.
4) Then the script writes the SMScriptRun value to the Registry with a value
of 1.
5) If the script does find the SMScriptRun value, set to 1, it simply exits,
as the script has already been run for this user.
If you want the same Pin To list for all users, regardless of whether
they've logged on before, or not, its a bit simpler, but as your experience
shows, it may still be necessary to restart the Explorer.exe process as part
of the logon.
Note: With VB script, it is difficult to write more than four bytes to a
binary value.
Good luck!
--
All the Best,
Kelly (TDB&TLS)
Microsoft-MVP Windows® XP
Troubleshooting Windows XP
http://www.kellys-korner-xp.com
Taskbar Repair Tool Plus!
http://www.kellys-korner-xp.com/taskbarplus!.htm
Thanks for the reply.
Im trying to customise an XP Pro environment and the PIN
Menu is one of the desired customisations. (I know Pin
Menu is meant to be customised by the user and not to be
scripted or programmed due to "BAD" software policy or
something). But that is the desired result.
So I wish to place specified icons/links in the PIN menu
and modify or distribute it via scipts (i.e. KIX32,
AutoIt..etc) actually straight command line with a linked
reg file would be ideal. So far the messy reg hacks are in
the following destination. It's a simple key copy and then
merge it into the current users environment via login
script.
The location is:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
\Explorer\
and the key copied is StartPage.
This key is then merged in into the users current
environment. Sometimes active quickly but somtimes
requires to log off to activate.
Thought the location would be shorter than pasting the
whole value in.
Thanks Again.