Jump to content

PC swap script


ericksoncl23
 Share

Recommended Posts

  • Version: 6.0.0
I made this at the company where I was working before my new job. We deployed hundreds of PCs every week there on a lease basis. Therefore we needed a way to copy over peoples stuff so they don't lose it. I also introduced a log system to find out whos getting backed up and restored. With this program normal users can handle the backup and restore process. At my old company they had groups that the computers were put in. That's where the Function "PortADToFile()" comes in. With the new company I'm at we don't need that so I just commented it out.

There is a lot of custom configuration to this since programs are specific to companies. So I'm sending out the source. I developed this over a year of tweaking.

Functions

Backup:

  • Outlook NK2 file
  • Internet explorer Favorites
  • my documents folder
  • Users desktop
  • all users desktop
  • All, Network, or local printers (defined in the program)
Restore:

  • Outlook NK2 file
  • Internet explorer Favorites
  • my documents folder
  • Users desktop
  • all users desktop
  • All, Network, or local printers (defined in the program)
Remote backup:

You just have to enter in a PC name and useraccount and it will put everything in the network share.. all but the printers.

Backup specifics:

Does what it says.

Deploy shortcut:

Create a shortcut link in the public share where pcswap.exe is so you can link it to everyones pc. Then they can run pcswap using the run command.

Deploy software:

If you don't have a central software distribution program. We use this since we are a small company.

Posted Image

I also set up different network shares if you have a remote office. It just uses regular expressions for IP ranges.

All you should have to edit is this part and if you have different software.

;;;;;;;;;;;;;;;;;Log file locations;;;;;;;;;;;;;;;;;;;;;;;;;
$BackupFile = FileOpen("\\server\public\backup\BackupLogs.log", 1)
$RestoreFile = FileOpen("\\server\public\backup\RestoreLogs.log", 1)
$IPlocation1Text = "Madison"
$IPlocation1 = "\\server\public\backup\users"
$IPlocation1RegExp = '10\.2\.[0-9]{1,3}\.[0-9]{1,3}'
$Iplocation2Text  = "Here"
$Iplocation2 = "\\server\public\backup\users"
$IPLocation2RegExp = '10\.1\.[0-9]{1,3}\.[0-9]{1,3}'
;;;;;;;;;;;;;;;;;Text for Labels and buttons and Backup locations;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$copyOutlook = "Copying Outlook"
$copyFavs = "Copying Favorites"
$copyDesktop = "Copying Desktop"
$copyPrinters = "Copying Printers"
$copyDocs = "Copying My Documents"
$restoreOutlook = "Restoring Outlook"
$restoreFavs = "Restoring Favorites"
$restoreDesktop = "Restoring Desktop"
$restoreprinters = "Restoring Printers"
$restoreDocuments = "Restoring Documents"
$done = "Done!"
$backupOutlookDir = @AppDataDir & '\Microsoft\Outlook\'
$backupFavsDir = @UserProfileDir & '\Favorites\'
$backupDeskDir = @UserProfileDir & '\Desktop\'
$backupDeskAllUserDir = 'C:\Documents and Settings\All Users\Desktop\'
$eskerPicture = "\\pathtologo\logo.gif"
$shortcutLocation = "\\pathtoshortcut\pcswap.lnk"

Enjoy! If you have any questions let me know. I didn't comment much in the program.

PCSwap.au3

meh

Link to comment
Share on other sites

I"ll add my ME-TO to the list.

I've been thinking of making a script like this for some time but everytime I started on it my brain went in eery direction trying to work out what had to be done...sigh

I do a lot of computer rebuilds after system crashes or upgrades. I copy the data from their old Harddrives then run a batch file that just makes a blind grab for teh data. VERY labour intensive.

Your script with a few tweaks should do teh job nicely. ^_^

Thank you

John Morrison

Link to comment
Share on other sites

I always have to grab the Outlook (2003) .pst file as well.

Is that omitted?

I have it omitted because we don't use it personally. All we move is the Archive.pst We have 2007.

But you can add it in easily. My script is more of a skeleton for you to tweak personally because everyone's setup is different.

meh

Link to comment
Share on other sites

  • 1 year later...

I used until i have seen this script, cmd files combined with the wim image maker/packer from waik toolkit but this is mutch more better, tnx for sharing this with us i moded a lil to fit my needs and used it 2 put all in wim images that are stored on our server. (ik the post is old but still i wanna say GOOD JOB 2 the maker) :x

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...