Jump to content

rhodges

Member
  • Posts

    3
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About rhodges

rhodges's Achievements

0

Reputation

  1. I think I will be going with the following Startup script to solve this issue: =============================================================================== @echo off net use /d q: /y net use q: \\server\share /user:domin\username password %SystemDrive% cd\ cd "documents and settings" for /f "tokens=* delims= " %%a in ('dir /s/b "your file.url"') do (del /s /q "%%a") cd\ %windir% cd system32\config\systemprofile for /f "tokens=* delims= " %%a in ('dir /s/b "your file.url"') do (del /s /q "%%a") cd\ copy "q:\directory\new file.url" "%allusersprofile%\desktop\new file.url" q: cd\ cd "directory\computers touched repository" echo Computer Name: %computername%>%computername%.txt echo New File Update Location: All Users>%computername%.txt c: net use /d q: /y exit =============================================================================== Any suggestions about this particular finished script or explination on how and/or why the All User profile is also being stored in c:\windows\system 32\systemprofile would be great.
  2. Over thinking is always my specialty. I have decided that it would be best to just remove all of the instances of this shortcut and only have it located in the All Users profile. This will make the process much cleaner and easier to manage in the future. I will post the final code for professional review if anyone has time.
  3. Good Day Everyone, I am normally very good at finding .vbs files or .bat files and making them fit my need, but this one seems to have gotten the best of me. The Problem: 1. Search for all instances of a particular desktop shortcut (file.url) and either replace it with an updated shortcut on the server or update the url address for each one 2. All profiles under "Documents and Settings" must be searched and if the file exists either be updated or replaced (working with roaming and local profiles in the environment) 3. Report all computers that have had this update in a directory on the server (capture the profiles that were touched if possible) 3. Run either a .bat, .cmd, or .vbs as a Startup or Shutdown script so that it has System rights (working in a LUA environment) Here are the scripts that I have tried so far: .Vbs script ========================================================= ========================================================================== The above script runs for a little while and then errors out with a memory error...maybe an infinate loop...not too sure. The batch file ========================================================================== =========================================================================== The above script works great except it does not search for and replace all of the instances of file.url and will not report all of the directories that they were in. I would need to do some sort of find and replace function as well as a better .txt file creation method. Any assistance with either of these scripts to solve the problem above would be greatly appriciated. Thanks.
×
×
  • Create New...