#64130 - 2002-03-27 03:09 PM
Re: Copying files using Kix 3.63
|
Mart
KiX Supporter
   
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
|
|
|
Top
|
|
|
|
#64132 - 2002-03-27 06:47 PM
Re: Copying files using Kix 3.63
|
Mart
KiX Supporter
   
Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
|
Ok looking at some kix code for 3 1/2 days will make you kind of blind for your own mistakes (not to forget a little bit grazie ). An ex-coworker of me looked at the script this afternoon and solved my problem in about 10 minutes, of course he's now, I felt pretty dumb.
Just removing the target filename solved everything.
Thanx for the help you supplied, it did not solve the problem but thanx anyway.
And now?? First I need a Beer!
[Edit] In case anybody wants to know, this the working code.
; ? "** Starting Automatic MS Outlook Profile Generation..." ? "** Checking if Outlook is installed..." $i1 = Exist ("c:\program files\microsoft office\office10\outlook.exe") If ($i1 = 1) Goto Check_Profile ? "** Outlook is NOT installed, skipping to end of script..." Goto End
:Check_Profile ? "** Checking if outlook userprofile exists..." $i2 = Exist ("%userprofile%\application data\microsoft\outlook\%username%.fav") $rc = WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\setup", "ImportPRF", "%HOMESHARE%\outlook.prf", "REG_SZ")
If ($i2 = 0) Goto Copy_Profile ? "** Outlook profile found... skipping to end of script..." Goto End
:Copy_Profile ? "** Copying Default Outlook Profile..." Select Case Ucase(@HOMESHR) = "\\NT1\USERS" Shell "%COMSPEC% /E:1024 /C COPY " + @LDRIVE + "olp_rot.prf " + "%windir%\outlook.prf > NUL" Case Ucase(@HOMESHR) = "\\AMSSVR01\USERS" Shell "%COMSPEC% /E:1024 /C COPY " + @LDRIVE + "olp_ams.prf " + "%windir%\outlook.prf > NUL" EndSelect ? "** Creating new Outlook profile based on current user..." Shell "%COMSPEC% /E:1024 /C " + @LDRIVE + "prfpatch.exe"
$source = %WINDIR% $dest = @HOMESHR
Select Case Ucase(@HOMESHR) = "\\NT1\USERS" Shell "%COMSPEC% /E:1024 /C COPY " + $source + "\outlook.prf " + "\\NT1\users\"+ @USERID Case Ucase(@HOMESHR) = "\\AMSSVR01\USERS" Shell "%COMSPEC% /E:1024 /C COPY " + $source + "\outlook.prf " + "\\AMSSVR01\users\"+ @USERID EndSelect
$rc = WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook\setup", "ImportPRF", "%HOMESHARE%\outlook.prf", "REG_SZ")
:End [ 27 March 2002, 19:01: Message edited by: R2D2 ]
_________________________
Mart
- Chuck Norris once sold ebay to ebay on ebay.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2419 anonymous users online.
|
|
|