Jump to content

PrepSys


ACalcutt
 Share

Recommended Posts

Semi-related note... I found Prepsys when looking for a solution to my issue..

I was working on a way for migrate user profiles using USMT 3.0.1 and AutoIT, to make it easy for other techs @ my job... The idea was to gather reg settings for Office apps, PSTs, Favorites, etc and docs, and archive them, moving their info to another site, sometimes w/ a new username and on a different domain (not a child domain), without any further setup...

It was to be a 2-part app, Bacup and Picup - one runs Scanstate, the other Loadstate, w all arguments supplied from the GUI...

I am switching over to a simpler tool for my techs, Workstation Migration Assistant - and I am lacking the time to write something this polished...

Anyway - here's the (incomplete code) - I hope it can be a good starting point for someone more skilled/dedicated...

; MAIN GUI ROUTINE ----------------------------------

GUICreate(" bacup - pickup", 300,600)

GUICtrlCreateLabel ("Source Domain:", 5,0)

$domain1 = GUICtrlCreateInput (@LogonDNSDomain, 15, 15, 200, 20)

GUICtrlCreateLabel ("Source User:", 5,40)

$user1 = GUICtrlCreateInput ("username", 15, 60, 200, 20)

GUICtrlCreateLabel ("Source Host:", 5,83)

$sourcehost1 = GUICtrlCreateInput (@ComputerName, 15, 100, 150, 20)

; Add y/n choice to add local server as first store path?

;

GUICtrlCreateLabel ("Destination Domain:", 5,150)

$domain2 = GUICtrlCreateInput ("newdomain", 15, 180, 200, 20)

GUICtrlCreateLabel ("Destination User:", 5,210)

$user2 = GUICtrlCreateInput ("newusername", 15, 230, 200, 20)

GUICtrlCreateLabel ("Destination Host:", 5,250)

$desthost1 = GUICtrlCreateInput ("E000000", 15, 270, 150, 20)

GUICtrlCreateLabel ("File Store Path:", 5,300)

$storepath1 = GUICtrlCreateInput ("\\destinationserver\usershare\newusername", 15, 330, 250, 20)

$btn = 0

GuiCtrlCreatePic("bacup2p.gif",35,370, 196,166)

; OK button -------------------

$btn = GUICtrlCreateButton ("Ok", 40, 560, 60, 20)

GUISetState ()

$msg = 0

While $msg <> $GUI_EVENT_CLOSE

$msg = GUIGetMsg()

$btn = GUIGetMsg()

Select

Case $msg = $btn

exitloop

EndSelect

Wend

;

; END MAIN GUI ROUTINE ----------------------------------

; Sanitize input?

; onerr for user or domain?

;

$fqusername = $domain1 +"\"+ $user1

; --------------CREATE CFG Bacup-p log to be used later for Bacup-d ----------------------------------

$rundate=@MDAY &"/"& @MON &"/"& @YEAR &"-" & @HOUR &":"& @MIN

; create rundate value

$logpath = $destination & "\bacup-picup.cfg"

FileOpen($logpath, 1)

FileWriteLine($logpath, "===============") ; header

FileWriteLine($logpath, "Bacup-p config") ; header - PICUP

FileWriteLine($logpath, $rundate) ; header - DATE

FileWriteLine($logpath, "===============") ; header

FileWriteLine($logpath, $domain1)

FileWriteLine($logpath, $user1)

FileWriteLine($logpath, $sourcehost1)

FileWriteLine($logpath, "---")

FileWriteLine($logpath, $domain2)

FileWriteLine($logpath, $user2)

FileWriteLine($logpath, $desthost1)

FileWriteLine($logpath, $storepath1)

FileClose($logpath)

; -------------- CLOSE CFG Bacup-p cfg to be used later for Bacup-d ----------------------------------

; SCANSTATE ROUTINE -------------------------------------

$fqusername = $domain1 +"\"+ $user1

$pltotal= "totalPercentageCompleted"

$plpercent= $pltotal

Run("scanstate.exe" & $storepath1 & "/i:miguser.xml /i:migapp.xml /i:migsys.xml /i:noTEMP.xml /i:noCnoProgs.xml /i:nomp3s.xml /o /v:5 /nocompress /localonly /l:scan.log /progress:prog.log /r:2 /w:1 /c /p /ui:"&$fqusername&" /ue:*\* /uel:5 /efs:skip /targetxp" @SW_HIDE)

; display progress

FileOpen($storepath1 & "prog.log", 1)

$plphase="Initializing"

ProgressOn("User profile Picup operation", $plphase, "", 300, 200, 16)

While 1

If @error Then

ProgressOff()

ExitLoop

Beep(500, 250)

FileClose($storepath1 & "prog.log")

Else

EndIf

; search proglog for: totalPercentageCompleted

FileRead("totalPercentageCompleted"

; search proglog for: totalMinutesRemaining

; search proglog for: Scanning

$proglogphase=

; search proglog for: Collecting

; search proglog for: Saving

; search proglog for: Estimating

; search proglog for: Applying

; END SCANSTATE ROUTINE -------------------------------------

Link to comment
Share on other sites

  • Replies 62
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 4 months later...

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...