Page 1 of 2 12>
Topic Options
#195821 - 2009-09-09 06:55 PM Kix script window up for a long time
Gee Offline
Fresh Scripter

Registered: 2009-02-04
Posts: 48
Loc: illinois
hello guys, sometimes for my users here the kix script window is up for a long time. What can i add to my script to make the window disappear after a long time of being up.
Top
#195824 - 2009-09-09 07:32 PM Re: Kix script window up for a long time [Re: Gee]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I think you best try to find first why the script window "hangs".
  • Try to run the script or a copy interactive. Try to show the commands you run. Put some indicators in the script like:
     Code:
    ...
    ? "Step 1"
    ...
    ? "Step 2"
    ...
    ? "Step 3"
    ...
    

    so you see how long it takes to get there
  • Run the script in debug mode with:
    kix32.exe /d YourScript.kix
  • Put some
    ?@ERROR": "@SERROR
    in the script if you expect errors
  • Put
    Debug On
    in the script where you expect it to go wrong and continue step by step

etc...

Top
#195825 - 2009-09-09 07:34 PM Re: Kix script window up for a long time [Re: Witto]
Gee Offline
Fresh Scripter

Registered: 2009-02-04
Posts: 48
Loc: illinois
I don't think it has any errors. this happens randomly with the PC's here in the domain. Most of the time the script runs and exits properly, but sometimes it just hangs.
Top
#195827 - 2009-09-09 08:01 PM Re: Kix script window up for a long time [Re: Gee]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I did not want to say your script has errors.
If it is about Startup/Shutdown/Logon/Logoff scripts, I think these run per default maximum 10 minutes. I think this can be changed via Group Policy
Computer COnfiguration --> Administrative Templates --> System/Scripts --> Maximum wait time for group policy scripts
But I presume that is not what you were looking for

Top
#195828 - 2009-09-09 08:03 PM Re: Kix script window up for a long time [Re: Witto]
Gee Offline
Fresh Scripter

Registered: 2009-02-04
Posts: 48
Loc: illinois
No i am not. I am just looking for something i could put in the script if it hangs for like 10 min then terminates
Top
#195829 - 2009-09-09 08:07 PM Re: Kix script window up for a long time [Re: Gee]
Gee Offline
Fresh Scripter

Registered: 2009-02-04
Posts: 48
Loc: illinois
If its any help i believe it hangs sometimes when the script connects to printers.
Top
#195830 - 2009-09-09 08:22 PM Re: Kix script window up for a long time [Re: Gee]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Check if the printer is installed on the computer before installing it. PriMapState() is an UDF that can help speed up your logon script while mapping printers.
Top
#195832 - 2009-09-09 08:54 PM Re: Kix script window up for a long time [Re: Witto]
Gee Offline
Fresh Scripter

Registered: 2009-02-04
Posts: 48
Loc: illinois
is there anything else like a sleep for 10 min or exit function that would work.
Top
#195833 - 2009-09-09 08:57 PM Re: Kix script window up for a long time [Re: Gee]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
If you can post your script, I think a lot more can be suggested.
Top
#195836 - 2009-09-10 01:00 AM Re: Kix script window up for a long time [Re: Allen]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
If you're sure that adding printers is slowing down your login script, than I suggest you use PriMapState(). I think you should not add printers that are installed. Checking this will speed up your script.
 Code:
;;;;;;;;;;;;;;;;;;
; Script Options ;
;;;;;;;;;;;;;;;;;;

If Not @LOGONMODE
	Break On
Else
	Break Off
EndIf
Dim $RC
$RC = SetOption("Explicit", "On")
$RC = SetOption("NoMacrosInStrings", "On")
$RC = SetOption("NoVarsInStrings", "On")
If @SCRIPTEXE = "KIX32.EXE"
	$RC = SetOption("WrapAtEOL", "On")
EndIf

;;;;;;;;;;;;;;;;;;;;;
; Declare variables ;
;;;;;;;;;;;;;;;;;;;;;

Dim $DefaultPrinter
Dim $Printer2

;;;;;;;;;;;;;;;;;;;;;;;;
; Initialize variables ;
;;;;;;;;;;;;;;;;;;;;;;;;

; Change the values to your needs
$DefaultPrinter = '\\YourServer\PrtAcc01'
$Printer2       = '\\YourServer\PrtAcc02'

;;;;;;;;
; Code ;
;;;;;;;;
If primapstate($Printer2) = ''
	AddPrinterConnection($Printer2)
EndIf
If PriMapState($DefaultPrinter) = ''
	$RC = AddPrinterConnection($DefaultPrinter)
EndIf
If primapstate($DefaultPrinter) = 1
	$RC = SetDefaultPrinter($DefaultPrinter)
EndIf

;;;;;;;;;;;;;;;;;;;;;;;;
; Personal UDF Section ;
;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;
; UDF Section ;
;;;;;;;;;;;;;;;

; Add here the PriMapState() UDF

Top
#195837 - 2009-09-10 01:41 AM Re: Kix script window up for a long time [Re: Witto]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
And if you have a script that is "hanging", then having a timer built into the script would not do any good as it would be "hung" as well.

Best is to find out what is causing the issue as others have stated and then deal with that issue.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#195850 - 2009-09-10 04:23 PM Re: Kix script window up for a long time [Re: Gargoyle]
Gee Offline
Fresh Scripter

Registered: 2009-02-04
Posts: 48
Loc: illinois
Here is the script!!!! Any help i would appreciate.

 Code:
color w+/m                                               ;change background color to yellow
cls                                                     ;Clears the screen

?"Here is some information about your session:"
?
?"Current Computer Name:        @wksta."
?"The Server you logged into:   @lserver."
?"Your IP Address is:           @ipaddress0."
?
?"Please wait while your login script connects all network resources..."

IF @inwin=2
  ?"Synchronizing your clock"
  settime "*"
  IF @error=0
    ?"Your clock has been synchronized"
  ELSE
    ?
    color n/r
    "Your clock has NOT been synchronized"
    ?"You either do not have rights to change the time or"
    ?"A Time Server was unable to be located."
    color n/g
  ENDIF
ENDIF

;Changes backround logon color to black.
writevalue("hkey_users\.default\control panel\colors","background","0 0 0","REG_SZ")


?
?"Disconnecting all network drives..."
use f: /del
use g: /del
use h: /del
use i: /del
use j: /del
use k: /del
use l: /del
use m: /del
use n: /del
use o: /del
use p: /del
use q: /del
use r: /del
use s: /del
use t: /del
use v: /del
use w: /del
use x: /del
use z: /del

;*******************************************************************
;Drive Mappings
;Server Name Variables

  $fileserver = "server1"
  $techserver = "server2"
  $newtechsrv = "server3"
  
?
?"Connecting all network drives..."

use k: "\\$fileserver\P"
use l: "\\$fileserver\S"

;*******************************************************************

IF INGROUP("fso_Of")
  use j: "\\$fileserver\Of"
ENDIF

IF INGROUP("fso_m")
  use p: "\\$fileserver\Me"
ENDIF

IF INGROUP("fso_member_i")
  use i: "\\$fileserver\iM"
ENDIF

IF INGROUP("fso_fi")
  use s: "\\server1\SAGE"
  use f: "\\$fileserver\F"
ENDIF

IF INGROUP("fso_hr")
  use x: "\\$fileserver\H"
ENDIF

IF INGROUP("fso_me")
  use p: "\\$fileserver\M"
ENDIF

IF INGROUP("fso_ma")
  use p: "\\$fileserver\Co"
ENDIF

;IF INGROUP("fso_marketing_creative")
;  use q: "\\$fileserver\Creative"
;ENDIF

IF INGROUP("fso_qa")
  use q: "\\$fileserver\QA"
ENDIF

IF INGROUP("fso_cha")
  use p: "\\$fileserver\C"
ENDIF

IF INGROUP("fso_pr")
  use h: "\\$fileserver\P"
ENDIF

IF INGROUP("fso_marketing_space")
  use o: "\\$fileserver\S"
ENDIF

IF INGROUP("fso_KT")
  use t: "\\$fileserver\K"
ENDIF

IF INGROUP("fso_cha")
  use m: "\\$fileserver\C"
ENDIF

IF INGROUP("fso_ex")
  use g: "\\$fileserver\E"
ENDIF

IF INGROUP("fso_re")
  use r: "\\$fileserver\R"
ENDIF

IF INGROUP("fso_t")
  use z: "\\$newtechsrv\T"
ENDIF

IF INGROUP("fso_dw")
  use w: "\\$fileserver\D"
ENDIF

IF INGROUP("fso_Re")
  use x: "\\$techserver\R"
ENDIF

IF INGROUP("fso_Re")
  use x: "\\$techserver\Recordings\%USERNAME%"
ENDIF


IF INGROUP("Non-Exempt Employees")
  copy "\\server5\NET\PunchINPunchOUT.url" "%USERPROFILE%\Start Menu\Programs\Startup\PunchINPunchOUT.url"
ENDIF

IF INGROUP("Domain Users")
  del "%USERPROFILE%\desktop\DatabaseCalender.lnk"
ENDIF

IF @wksta = "server1" or @wksta = "server2"
GoTo Skip
ENDIF
IF @wksta = "server4" or @wksta = "server5"
  IF @userid = "Administrator"
    writevalue("HKEY_Current_user\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","StartMenuAdminTools","NO","REG_SZ")
  ENDIF

  ;Installs Printers for Terminal Server Users.
  ;?"Removing Old Printers..."
  ;SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /dn /n\\a02\X7665FIN /q"
  ;SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /dn /n\\a02\X7665MEM /q"
ENDIF

;Installs printers for everybody.
IF @wksta <> server6

  ?
  ?"Installing Printers..."
  IF INGROUP("fso_t")
    ?"Mailroom printer install"
    SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\XWC120PS /q"
  ENDIF

  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\X7665FIN /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\X7665MEM /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\LJC2550PS3 /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\LJC3800PS /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\LJ4250NPS /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\LJ4250TN /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\LJ4250TN2 /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\LJ8100PCL6 /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\LJ8100PS /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\LJ4300PCL6 /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\MCROPLXF24 /q"
  SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\OJ7310 /q"
ENDIF

;Changes setting for tabs in IE7 
writevalue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing","ShortcutBehavior","0","REG_DWORD")

;Turns Internet Explorer start page to blank, enables recover deleted items in Outlook, enables num lock at logon, and sets IM and AutoArchive Preferences
;writevalue("hkey_Current_user\Software\Microsoft\Internet Explorer\Main","Start Page","about:blank","REG_SZ")
;writevalue("HKEY_USERS\.Default\Control Panel\Keyboard","InitialKeyboardIndicators","2","REG_SZ")
writevalue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Client\Options","DumpsterAlwaysOn","1","REG_DWORD")
writevalue("hkey_Current_user\Software\Microsoft\Internet Explorer\Main","Window Title","Provided by A A","REG_SZ")
writevalue("hkey_Current_user\Software\Microsoft\Office\11.0\Outlook\IM","Enabled","0","REG_DWORD")
writevalue("hkey_Current_user\Software\Microsoft\Office\11.0\Outlook\Preferences","DoAging","0","REG_DWORD")
:Skip
exit ;quits the login script


Edited by Mart (2009-09-10 04:34 PM)
Edit Reason: Please use code tags when posting code.

Top
#195854 - 2009-09-10 04:54 PM Re: Kix script window up for a long time [Re: Gee]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
  • Something like
    \\A01\OJ7310
    Is A01 the printer server and is OJ7310 the printer share name?
  • Do you know which printer should be the default?

If \\A01\X7665FIN is the full sharename to the printer you could replace a line like
 Code:
SHELL "CMD.EXE /C rundll32 printui.dll,PrintUIEntry /in /n\\A01\X7665FIN /q"

by
 Code:
If primapstate("\\A01\X7665FIN") = ''
	$RC = AddPrinterConnection("\\A01\X7665FIN")
EndIf

Do not forget to copy the PriMapState UDF code to your script, i.e. at the bottom

Top
#195856 - 2009-09-10 05:44 PM Re: Kix script window up for a long time [Re: Witto]
Gee Offline
Fresh Scripter

Registered: 2009-02-04
Posts: 48
Loc: illinois
I do not want to add printer deafults since everyone has a different default printer. I am a noob at kixtart, can you give me an example in what my code should look like. Is their anything i need to do to clean up the code to make the script run faster. Thanks
Top
#195858 - 2009-09-10 06:42 PM Re: Kix script window up for a long time [Re: Gee]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I just gave an example.
I will elaborate on the list of printers you are mapping.

\\A01\LJ4250NPS
\\A01\LJ4250TN
\\A01\LJ4250TN2

Is that 1 printer with 3 print queues with different drivers?
If yes, delete 2!
Stick to your preferred driver.

I.e. we prefer Pcl5 drivers for HP printers as they print faster
For Canon copiers, we prefer UFR drivers

 Code:
; ===========================================================================================
;
; 	Script Information
;	
;	Title:       
;	Author:      Wim Rotty
;	Date:        
;	Description: 
;	
;
; ===========================================================================================

;;;;;;;;;;;;;;;;;;
; Script Options ;
;;;;;;;;;;;;;;;;;;

If Not @LOGONMODE
	Break On
Else
	Break Off
EndIf
Dim $RC
$RC = SetOption("Explicit", "On")
$RC = SetOption("NoMacrosInStrings", "On")
$RC = SetOption("NoVarsInStrings", "On")
If @SCRIPTEXE = "KIX32.EXE"
	$RC = SetOption("WrapAtEOL", "On")
EndIf

;;;;;;;;;;;;;;;;;;;;;
; Declare variables ;
;;;;;;;;;;;;;;;;;;;;;

Dim $Printers, $Printer

;;;;;;;;;;;;;;;;;;;;;;;;
; Initialize variables ;
;;;;;;;;;;;;;;;;;;;;;;;;

$Printers = Split(''
	+ '\\A01\X7665FIN'   + '|'
	+ '\\A01\X7665MEM'   + '|'
	+ '\\A01\LJC2550PS3' + '|'
	+ '\\A01\LJC3800PS'  + '|'
	+ '\\A01\LJ4250NPS'  + '|'
	+ '\\A01\LJ4250TN'   + '|'
	+ '\\A01\LJ4250TN2'  + '|'
	+ '\\A01\LJ8100PCL6' + '|'
	+ '\\A01\LJ8100PS'   + '|'
	+ '\\A01\LJ4300PCL6' + '|'
	+ '\\A01\MCROPLXF24' + '|'
	+ '\\A01\OJ7310'     , '|')

;;;;;;;;
; Code ;
;;;;;;;;

For Each $Printer in $Printers
	If primapstate($Printer) = ''
		$RC = AddPrinterConnection($Printer)
	EndIf
Next

;;;;;;;;;;;;;;;;;;;;;;;;
; Personal UDF Section ;
;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;
; UDF Section ;
;;;;;;;;;;;;;;;

; Do not forget to add the PriMapState UDF

Top
#195859 - 2009-09-10 07:06 PM Re: Kix script window up for a long time [Re: Witto]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I would skip this and rethink about it
 Code:
color w+/m                                               ;change background color to yellow
cls                                                     ;Clears the screen

?"Here is some information about your session:"
?
?"Current Computer Name:        @wksta."
?"The Server you logged into:   @lserver."
?"Your IP Address is:           @ipaddress0."
?
?"Please wait while your login script connects all network resources..."

IF @inwin=2
  ?"Synchronizing your clock"
  settime "*"
  IF @error=0
    ?"Your clock has been synchronized"
  ELSE
    ?
    color n/r
    "Your clock has NOT been synchronized"
    ?"You either do not have rights to change the time or"
    ?"A Time Server was unable to be located."
    color n/g
  ENDIF
ENDIF

;Changes backround logon color to black.
writevalue("hkey_users\.default\control panel\colors","background","0 0 0","REG_SZ")

  • Run your login scripts silent, don't disturb your customers
  • Don't set the clock on Windows NT Workstations. Time is synchronized as they are part of the domain. It is needed for Windows authentication. You don't have any Windows 9x computers anymore? Users cannot change the time on their system anyway.
  • Do not write to HKEY_USERS in login scripts as normal users should not be able to do so.

Top
#195860 - 2009-09-10 07:22 PM Re: Kix script window up for a long time [Re: Witto]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
 Code:
IF INGROUP("Domain Users")
  del "%USERPROFILE%\desktop\DatabaseCalender.lnk"
ENDIF

I would presume that all users are per default member of this group. I think it is better to check if you have to delete something to avoid error messages.

Top
#195861 - 2009-09-10 07:24 PM Re: Kix script window up for a long time [Re: Witto]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
 Code:
GoTo Skip

Avoid the use of goto, as if you would use it more frequently, you will get attempted to create spagetti code.

Top
#195862 - 2009-09-10 07:43 PM Re: Kix script window up for a long time [Re: Witto]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
 Code:
WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Client\Options", "DumpsterAlwaysOn", "1", "REG_DWORD")

Most probably users will not be able to write to "HKEY_LOCAL_MACHINE"

Top
#195863 - 2009-09-10 07:52 PM Re: Kix script window up for a long time [Re: Witto]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Pay attention. This is just a draft that YOU have to test. I will not be responsible for any damage or problems you cause on your domain. I am just making a suggestion to change your login script. I cannot test the script. It can contain errors.
Use the things you like. Modify it to your needs. And most of all, test it step by step (i.e. start with putting most of the code in remark by adding ; )
 Code:
; ===========================================================================================
;
; 	Script Information
;	
;	Title:       
;	Author:      Wim Rotty
;	Date:        
;	Description: 
;	
;
; ===========================================================================================

;;;;;;;;;;;;;;;;;;
; Script Options ;
;;;;;;;;;;;;;;;;;;

If Not @LOGONMODE
	Break On
Else
	Break Off
EndIf
Dim $RC
$RC = SetOption("Explicit", "On")
$RC = SetOption("NoMacrosInStrings", "On")
$RC = SetOption("NoVarsInStrings", "On")
If @SCRIPTEXE = "KIX32.EXE"
	$RC = SetOption("WrapAtEOL", "On")
EndIf

;;;;;;;;;;;;;;;;;;;;;
; Declare variables ;
;;;;;;;;;;;;;;;;;;;;;

Dim $Printers, $Printer
Dim $Drives, $Drive

; Server Name Variables
Dim $fileserver
Dim $techserver
Dim $newtechsrv


;;;;;;;;;;;;;;;;;;;;;;;;
; Initialize variables ;
;;;;;;;;;;;;;;;;;;;;;;;;

$Drives = Split('f:|g:|h:|i:|j:|k:|l:|m:|n:|o:|p:|q:|r:|s:|t:|u:|v:|w:|x:|y:|z:','|')

$Printers = Split(''
	+ '\\A01\X7665FIN'   + '|'
	+ '\\A01\X7665MEM'   + '|'
	+ '\\A01\LJC2550PS3' + '|'
	+ '\\A01\LJC3800PS'  + '|'
	+ '\\A01\LJ4250NPS'  + '|'
	+ '\\A01\LJ4250TN'   + '|'
	+ '\\A01\LJ4250TN2'  + '|'
	+ '\\A01\LJ8100PCL6' + '|'
	+ '\\A01\LJ8100PS'   + '|'
	+ '\\A01\LJ4300PCL6' + '|'
	+ '\\A01\MCROPLXF24' + '|'
	+ '\\A01\OJ7310'     , '|')

; Server Name Variables
$fileserver = 'server1'
$techserver = 'server2'
$newtechsrv = 'server3'

;;;;;;;;
; Code ;
;;;;;;;;

; Disconnecting all network drives...
For Each $Drive in $Drives
	Use $Drive /del
Next

; Drive Mappings
Use k: '\\' + $fileserver + '\P'
Use l: '\\' + $fileserver + '\S'

If InGroup('fso_Of')
	Use j: '\\' + $fileserver + '\Of'
EndIf

If InGroup('fso_m')
	Use p: '\\' + $fileserver + '\Me'
EndIf

If InGroup('fso_member_i')
	Use i: '\\' + $fileserver + '\iM'
EndIf

If InGroup('fso_fi')
	Use s: '\\server1\SAGE'
	Use f: '\\' + $fileserver + '\F'
EndIf

If InGroup('fso_hr')
	Use x: '\\' + $fileserver + '\H'
EndIf

If InGroup('fso_me')
	Use p: '\\' + $fileserver + '\M'
EndIf

If InGroup('fso_ma')
	Use p: '\\' + $fileserver + '\Co'
EndIf

;IF INGROUP('fso_marketing_creative')
;  use q: '\\' + $fileserver + '\Creative'
;ENDIF

If InGroup('fso_qa')
	Use q: '\\' + $fileserver + '\QA'
EndIf

If InGroup('fso_cha')
	Use p: '\\' + $fileserver + '\C'
EndIf

If InGroup('fso_pr')
	Use h: '\\' + $fileserver + '\P'
EndIf

If InGroup('fso_marketing_space')
	Use o: '\\' + $fileserver + '\S'
EndIf

If InGroup('fso_KT')
	Use t: '\\' + $fileserver + '\K'
EndIf

If InGroup('fso_cha')
	Use m: '\\' + $fileserver + '\C'
EndIf

If InGroup('fso_ex')
	Use g: '\\' + $fileserver + '\E'
EndIf

If InGroup('fso_re')
	Use r: '\\' + $fileserver + '\R'
EndIf

If InGroup('fso_t')
	Use z: '\\' + $newtechsrv + '\T'
EndIf

If InGroup('fso_dw')
	Use w: '\\' + $fileserver + '\D'
EndIf

If InGroup('fso_Re')
	Use x: '\\' + $techserver+ '\R'
EndIf

If InGroup('fso_Re')
	Use x: '\\' + $techserver + '\Recordings\%USERNAME%'
EndIf


If InGroup('Non-Exempt Employees')
	Copy '\\server5\NET\PunchINPunchOUT.url' '%USERPROFILE%\Start Menu\Programs\Startup\PunchINPunchOUT.url'
EndIf

If Exist('%USERPROFILE%\desktop\DatabaseCalender.lnk')
	Del '%USERPROFILE%\desktop\DatabaseCalender.lnk'
EndIf

If Not @wksta = "server1" Or Not @wksta = "server2"
	If @wksta = "server4" Or @wksta = "server5"
		If @userid = "Administrator"
			$RC = WriteValue("HKEY_Current_user\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "StartMenuAdminTools", "NO", "REG_SZ")
		EndIf
	EndIf
	;Installs printers for everybody.
	If @wksta <> 'server6'
		; Installing Printers...
		If InGroup("fso_t")
			; Mailroom printer install
			If PriMapState('\\A01\XWC120PS') = ''
				$RC = AddPrinterConnection('\\A01\XWC120PS')
			EndIf
		EndIf
		For Each $Printer in $Printers
			If PriMapState($Printer) = ''
				$RC = AddPrinterConnection($Printer)
			EndIf
		Next
	EndIf
	;Changes setting for tabs in IE7 
	$RC = WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TabbedBrowsing", "ShortcutBehavior", "0", "REG_DWORD")
	
	;Turns Internet Explorer start page to blank, enables recover deleted items in Outlook, and sets IM and AutoArchive Preferences
	$RC = WriteValue("hkey_Current_user\Software\Microsoft\Internet Explorer\Main", "Window Title", "Provided by A A", "REG_SZ")
	$RC = WriteValue("hkey_Current_user\Software\Microsoft\Office\11.0\Outlook\IM", "Enabled", "0", "REG_DWORD")
	$RC = WriteValue("hkey_Current_user\Software\Microsoft\Office\11.0\Outlook\Preferences", "DoAging", "0", "REG_DWORD")
EndIf

;;;;;;;;;;;;;;;;;;;;;;;;
; Personal UDF Section ;
;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;
; UDF Section ;
;;;;;;;;;;;;;;;

; Do not forget to add the PriMapState UDF

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.075 seconds in which 0.025 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org