Jump to content

benaw

Member
  • Posts

    18
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Australia

About benaw

benaw's Achievements

0

Reputation

  1. Moving the files isn't a problem i'm concerned about destroying the "eggs" 1000 hyperlinks, i would like to mass edit part of the hyperlinks in the excel file.
  2. I have an egg that went and hyperlinked to around 1000 docs, the egg wants every one to be able to view these docs but all of the docs are in a proctected folder that not eveyone has access to...... sooo what do yas think? i'd like to move the docs to another location and mass edit part of the hyperlinks.
  3. if you want to enter it all in manually then why not just use excel?
  4. is it possiable to set ghost to automatically image c: and store it on d: (d: would be a partitioned drive on the same hdd) would it matter if it was primary or extended??
  5. on laptops they have fn + f(1-10) to turn on wirless increace britness etc i want a script that can uterlise this function eg turn wirless on fn+f8 i cant find syntax for the fn button i was looking ad vbs sendkeys method This would be used on remote computers (i know how to turn my wirless on and dont have to call support 10 times a week) so id prefere not to use a third party app that requires instilation.
  6. :> Thankyou thats something i totaly over looked. cheers. do you know what the limitations of robocopy are? i red that it was your pageing file and ram i.e can not copy file larger than space avaliable.
  7. i am trying to copy a 6.4GB .nsf (notes DB) from my c: to a Ext USB HDD so far i have tried SyncToy Robocopy TeraCopy. synctoy doesn't even see it, robocopy falls over i have increased the page file to max and teracopy falls over at about 4GB i have red about lots of programs out there but i reallly cant find one that will handle a really large single file pls help
  8. sry that post was a bit of a mess there must be a better way of doing this what i need to do is backup all the user data on each machine, i do not have access to the domain controller but i have the local admin password for each machine. i'm going to look into robocopy today see if it will follow a little script that lists all the computer names i want to target and copy folders omitting certain sub folders. firstly is this possible with robocopy? if so i'll keep looking into it and secondly could you give me advise on combining those two scripts so that i can get a list of all the computer names in a text file i know it's all there i just haven't been able to make sense of it yet.
  9. hey guys, i am trying to write a script and am a bit new to this. what i want to do is ping a range of computers resolve the computer name export that to a text file. then from that i would like to write a script similar to http://www.microsoft.com/technet/scriptcen...nario1-vbs.mspx which i'll use to make the computers logon as administrator and run another script, i want that script to copy user profile to a network share. is this script a little too ambitious?? what i want is a script that copys everything from each computer other than the folders i know about and store the folders by computer name from, all from an ip range. the only way i know of to copy a folder in vbs and omit sub folders is to copy the entire folder to a temporary folder then delete the ones i don't want like admin default, from the doc's & settings etc, but i'm not going to be able to do this because obviously i'm gonna get files in use error. because of this i did some research into robocopy to see if i could use that to omit known unwanted folders i don't know if that will work yet, one of the problems is i don't know the user name for each machine. i really don't know if this can work or if there is a better way please let me know what you think, can this be done? this script does the reverse of what i want as far as the docs and settings. it deletes the user which is the part i want. This part deletes all user profiles except for the ones listed as > exceptions. > Can probably help you to copy all but some profiles for the backups. > > > > '----------------------------- Remove Normal User Profile > ------------------------------------ > '--------------------------------------------------------------------------------------------- > Private Function RemoveUserProfile(strWksName) > Dim objFS > Dim strProfilePath > Dim objProfileFolder > Dim objSubFolder > Dim strExceptions > Dim arrExceptions > Dim intIndex > Dim bolDelete > Dim strLog > > On Error Resume Next > strExceptions = "Administrator,All Users,Default > User,Localservice,NetworkService" > arrExceptions = Split(strExceptions,",") > > Set objFS = Wscript.CreateObject("Scripting.FileSystemObject") > strProfilePath = "\\" & strWksName & "\D$\Documents and Settings" > If objFS.FolderExists(strProfilePath) Then > Set objProfileFolder = objFS.GetFolder(strProfilePath) > For Each objSubFolder in objProfileFolder.SubFolders > bolDelete = True > For intIndex = 0 To UBound(arrExceptions) > If UCase(objSubFolder.Name) = UCase(arrExceptions(intIndex)) Then > bolDelete = False > Exit For > End If > Next > > If bolDelete Then > Wscript.Echo "Delete user profile of " & objSubFolder.Name > strLog = strLog & vbCrLf & "Delete user profile of " & > objSubFolder.Name > objSubFolder.Delete True > End If > Next > End if > RemoveUserProfile = strLog > End Function the below scripts will ping a ip range and the other creates a simple text file but i need to combine them Option Explicit Dim strIPAddress, objShell, objFSO, strTemp, strTempFile Dim strSubNet, intStart, intEnd, strResult, k Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Wscript.Shell") ' Specify temporary file to save ping results. strTemp = objShell.ExpandEnvironmentStrings("%TEMP%") strTempFile = strTemp & "\RunResult.tmp" ' Specify the subnet to check and the starting and ending addresses. strSubNet = "10.10.5." intStart = 0 intEnd = 255 ' Check all possible addresses. For k = intStart To intEnd strIPAddress = strSubNet & CStr(k) ' Check if the addresses responds to a ping. If (PingIP(strIPAddress, 1, 100) = True) Then ' Ping again to resolve the host name. strResult = PingMachine(strIPAddress, 1, 100) Wscript.Echo strIPAddress & " " & strResult End If Next Function PingIP(strHost, intPings, intTO) ' Returns True if IP Address can be pinged, False otherwise. ' Based on a program by Alex Angelopoulos and Torgeir Bakken. ' Variables objFSO, objShell, and strTempFile have global scope ' and must be declared in the main program. Dim objFile, strResults Const OpenAsDefault = -2 Const FailIfNotExist = 0 Const ForReading = 1 If (intPings = "") Then intPings = 2 End If If (intTO = "") Then intTO = 750 End If ' Ping the machine and pipe results to temporary file. objShell.Run "%comspec% /c ping -n " & intPings & " -w " & intTO _ & " " & strHost & ">" & strTempFile, 0, True ' Read the file. Set objFile = objFSO.OpenTextFile(strTempFile, ForReading, _ FailIfNotExist, OpenAsDefault) strResults = objFile.ReadAll objFile.Close ' Check for response. Select Case InStr(strResults, "TTL=") Case 0 ' No response. PingIP = False Case Else ' Host responded to ping. PingIP = True End Select End Function Function PingMachine(strHost, intPings, intTO) ' Returns host name if IP Address can be pinged. ' Based on a program by Alex Angelopoulos and Torgeir Bakken. ' Variables objFSO, objShell, and strTempFile have global scope ' and must be declared in the main program. Dim objFile, strResults, intIndex1, intIndex2 Const OpenAsDefault = -2 Const FailIfNotExist = 0 Const ForReading = 1 If (intPings = "") Then intPings = 2 End If If (intTO = "") Then intTO = 750 End If ' Ping the machine and pipe results to temporary file. objShell.Run "%comspec% /c ping -a -n " & intPings & " -w " & intTO _ & " " & strHost & ">" & strTempFile, 0, True ' Read the file. Set objFile = objFSO.OpenTextFile(strTempFile, ForReading, _ FailIfNotExist, OpenAsDefault) strResults = objFile.ReadAll objFile.Close ' Check for response. Select Case InStr(strResults, "TTL=") Case 0 ' No response. PingMachine = "" Case Else ' Host responded to ping. Parse for host name. intIndex1 = InStr(strResults, "Pinging ") intIndex2 = InStr(intIndex1, strResults, " [") If (intIndex1 > 0) And (intIndex2 > intIndex1) Then PingMachine = Mid(strResults, intIndex1 + 8, _ intIndex2 - intIndex1 - 8) Else PingMachine = "<unknown>" End If End Select End Function that code looks really good i just need to combine it with this: Option Explicit Dim objFSO, objFolder, objShell, objTextFile, objFile Dim strDirectory, strFile, strText strDirectory = "j:\DATA_1\scripts\test" strFile = "\answer.txt" strText = "Book Another Holiday " & date() &" "& Time() ' Create the File System Object Set objFSO = CreateObject("Scripting.FileSystemObject") ' Check that the strDirectory folder exists If objFSO.FolderExists(strDirectory) Then Set objFolder = objFSO.GetFolder(strDirectory) Else Set objFolder = objFSO.CreateFolder(strDirectory) 'WScript.Echo "Just created " & strDirectory End If If objFSO.FileExists(strDirectory & strFile) Then Set objFolder = objFSO.GetFolder(strDirectory) Else Set objFile = objFSO.CreateTextFile(strDirectory & strFile) 'Wscript.Echo "Just created " & strDirectory & strFile End If set objFile = nothing set objFolder = nothing ' OpenTextFile Method needs a Const value ' ForAppending = 8 ForReading = 1, ForWriting = 2 Const ForAppending = 8 Set objTextFile = objFSO.OpenTextFile _ (strDirectory & strFile, ForAppending, True) ' Writes strText every time you run this VBScript objTextFile.WriteLine(strText) objTextFile.Close ' Bonus or cosmetic section to launch explorer to check file If err.number = vbEmpty then Set objShell = CreateObject("WScript.Shell") objShell.run ("Explorer" &" " & strDirectory & "\" ) Else WScript.echo "VBScript Error: " & err.number End If WScript.Quit this should then get me a list of computer names in a text file.
  10. yeah but yahoo widgets is too messy i was looking for something a little simpler than that, but thanks
  11. there is a magnitude of s*** clock software out there i was wondering what some of you used? i just want a small app that sits on the desktop that can show multiple Australian times i really really like the iphone clock something like that would be perfect.
  12. i'm just thinking of an office environment, using HDD imaging software to take a backup of user data, as well as programs and settings which i guess isn't as important. i have been looking in to ghostcast today. it would be good to take an image of each computer over the Christmas break surely there's something out there that can be deployed easily to back up all computers on the network to a single location and have it sorted by computer name. at this stage i'm pretty sure ghostcast will do it might still be a bit messy tho. do you know of anything else i should look at?
  13. does any one have any suggestions on how to image multiple computers quickly? i was wondering if there was a way to store boot instructions on a DVD-RW that would boot into an imaging program and ideally automatically back up c: and store it on the same DVD??
  14. this works for notepad "Notepad saved position If you use multiple screens or monitors, like me, then you may have ended up with a problem where notepad ends up beyond the boundaries of your window. Further, the toolbar is hidden rendering it impossible to move it into view. You can edit the registry settings to reset this: My Computer\HKEY_CURRENT_USER\Software\Microsoft\Notepad fSaveWindowPositions, iWindowPos* can be deleted. Then restart notepad and it should reset itself to your main screen. " http://www.xnote.com/forums/viewthread.php?tid=83
×
×
  • Create New...