#174051 - 2007-02-19 06:17 PM
Problems with wshShortcut UDF
|
tylan
Starting to like KiXtart
Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
|
I've been using wshShortcut for quite a while w/o any problems. I have the code pasted into my script exactly as it is in the UDF (2/19/2006). For some reason it keeps hanging my script. When I use debug, it hangs at this point: $shortcut.targetpath = $targetpath
Any help would be appreciated. Tylan
See wshShortcut UDF below: Current Version of wshShortcut UDF
Edited by tylan (2007-02-19 08:54 PM)
|
|
Top
|
|
|
|
#174053 - 2007-02-19 07:00 PM
Re: Problems with wshShortcut UDF
[Re: Witto]
|
tylan
Starting to like KiXtart
Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
|
I'm just calling it as follows:
IF InGroup("PoliciesProcedures")
USE p: /delete /persistent
USE p: "\\nas2\policies"
$rc=wshShortcut("Policies on NAS2","\\nas2\policies")
ENDIF
|
|
Top
|
|
|
|
#174054 - 2007-02-19 07:02 PM
Re: Problems with wshShortcut UDF
[Re: Witto]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
What Witto is saying is that you have posted the UDF and we all know the UDF is fine, the problem must be in your code or a related problem. Please post your entire code so that we can better help you.
|
|
Top
|
|
|
|
#174055 - 2007-02-19 07:12 PM
Re: Problems with wshShortcut UDF
[Re: Benny69]
|
tylan
Starting to like KiXtart
Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
|
Here's my main logon script:
BREAK ON
$SO=SetOption("WrapAtEOL","ON")
call "\\somehosp.local\netlogon\kixtart\functions.udf"
$rc=settitle("Logon Script")
COLOR c/n
? "Hello, " + @fullname
?
? "Today is " @day + ", " + @month + " " +@mdayno + ", " + @year
?
? "Welcome to the Somerset Hospital Computer Network!"
?
SETTIME "\\SOMERSET-DC"
COLOR c/n
;#########################################
;BEGIN GROUP BASED DRIVE MAPPINGS
?? "Processing Group Based Drive Mappings"
;Drive Mappings For Paragon
IF InGroup("WinTermParagon", "ParStdUsers", "ParFormsUsers")
$rc=wshShortcut("Paragon Procedures & Forms","\\paragonrpt\var_test\PARAGON PROCEDURES & FORMS")
USE R: /delete /persistent
USE T: /delete /persistent
USE V: /delete /persistent
USE R: "\\Paragonrpt\var_rpt"
USE T: "\\Paragonrpt\var_test"
USE V: "\\Paragondb\vardata"
IF InGroup("ParFormsUsers")
USE Z: /delete /persistent
USE Y: /delete /persistent
USE Y: "\\parntier\PrintForms"
ENDIF
ENDIF
;Drive Mappings For ClaimsAdm
IF InGroup("BusinessOfficeUsers")
USE k: "\\busoffserver\data"
$rc=wshShortcut("Data on BusOffServer","\\busoffserver\data")
USE s: "\\paragondb\ClaimAdm"
$rc=AddPrinterConnection("\\busoffserver\1500")
$rc=AddPrinterConnection("\\busoffserver\UB92")
$rc=AddPrinterConnection("\\busoffserver\Statement")
$rc=AddPrinterConnection("\\busoffserver\HP4050")
$rc=AddPrinterConnection("\\busoffserver\Laser2")
$claimtrk="\\somehosp.local\appdeploy\commonlogs\claimsadupdates.ini"
; IF ReadProfileString($claimtrk, @wksta, "INIUpdate") <> "Yes"
; $rc=WriteProfileString($claimtrk, @wksta, "Username", @userid)
; COPY "\\paragondb\I_Kit\INI Files\Biller Workstation\claimsad.ini" "%WINDIR%\claimsad.ini"
; IF @error = 0
; $rc=WriteProfileString($claimtrk, @wksta, "INIUpdate", "Yes")
; ELSE
; $rc=WriteProfileString($claimtrk, @wksta, "INIUpdate", @serror)
; ENDIF
; ENDIF
ENDIF
IF InGroup("HHOfficeAdmin")
USE F: /delete /persistent
USE F: "\\nas2\HomeHealth"
ENDIF
IF InGroup("PoliciesProcedures")
USE p: /delete /persistent
USE p: "\\nas2\policies"
;$rc=wshShortcut("Policies on NAS2","\\nas2\policies")
ENDIF
IF InGroup("Quality")
USE q: /delete /persistent
USE q: "\\nas2\quality"
$rc=wshShortcut("Quality on NAS2","\\nas2\quality")
ENDIF
IF InGroup("HorizonHomecare")
USE l: /delete /persistent
USE l: "\\hhsql\mckesson"
ENDIF
IF InGroup("Staffing")
USE s: /delete /persistent
USE s: "\\nas2\staffing"
$rc=wshShortcut("Staffing on NAS2","\\nas2\staffing")
ENDIF
IF InGroup("OperatingRoom")
USE o: "\\nas2\or"
ENDIF
IF InGroup("OHMWIN")
USE o: "\\nas2\ohmwin"
ENDIF
IF InGroup("RadMammo")
USE m: "\\rad_srv\mammography"
ENDIF
IF InGroup("UtilizationReview")
USE u: /delete /persistent
USE u: "\\nas2\ur" /persistent
ENDIF
IF InGroup("ClaimsAdmin")
USE s: /delete /persistent
USE s: "\\paragondb\ClaimAdm"
ENDIF
IF InGroup("ClaimsAdminTest")
USE s: /delete /persistent
USE s: "\\paragondb\ClaimAd12"
ENDIF
IF InGroup("Craneware")
USE z: /delete /persistent
USE z: "\\quadramed-svr\Craneware"
ENDIF
; ###############################################
; BEGIN GROUP BASED PRINTERS
?? "Processing Group Based Printers"
$rc=DelPrinterConnection("\\print-svr\4A_Konica")
$rc=DelPrinterConnection("\\print-svr\3A_Konica")
$rc=DelPrinterConnection("\\print-svr\SDS_Konica")
$rc=DelPrinterConnection("\\print-svr\gi_lab_konica")
;$rc=DelPrinterConnection("\\print-svr\or_konica")
IF InGroup("OperatingRoomPtr")
$rc=AddPrinterConnection("\\print-svr\gi_lab_laser")
$rc=AddPrinterConnection("\\print-svr\sds_laser")
$rc=AddPrinterConnection("\\print-svr\pacu_lj1320")
$rc=AddPrinterConnection("\\print-svr\or_nurse_laser")
ENDIF
IF InGroup("3ACowPtr")
$rc=AddPrinterConnection("\\print-svr\3A_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3B_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3C_Konica")
$rc=AddPrinterConnection("\\print-svr\4A_LASER")
$rc=AddPrinterConnection("\\print-svr\CCU_LJ1320")
$rc=AddPrinterConnection("\\print-svr\ER_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\3A_LJ1320")
ENDIF
IF InGroup("3BCowPtr")
$rc=AddPrinterConnection("\\print-svr\3A_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3B_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3C_Konica")
$rc=AddPrinterConnection("\\print-svr\4A_LASER")
$rc=AddPrinterConnection("\\print-svr\CCU_LJ1320")
$rc=AddPrinterConnection("\\print-svr\ER_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\3B_LJ1320")
ENDIF
IF InGroup("3CCowPtr")
$rc=AddPrinterConnection("\\print-svr\3A_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3B_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3C_Konica")
$rc=AddPrinterConnection("\\print-svr\4A_LASER")
$rc=AddPrinterConnection("\\print-svr\CCU_LJ1320")
$rc=AddPrinterConnection("\\print-svr\ER_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\3C_Konica")
ENDIF
IF InGroup("4ACowPtr")
$rc=AddPrinterConnection("\\print-svr\3A_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3B_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3C_Konica")
$rc=AddPrinterConnection("\\print-svr\4A_LASER")
$rc=AddPrinterConnection("\\print-svr\CCU_LJ1320")
$rc=AddPrinterConnection("\\print-svr\ER_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\4A_LASER")
ENDIF
IF InGroup("CCUCowPtr")
$rc=AddPrinterConnection("\\print-svr\3A_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3B_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3C_Konica")
$rc=AddPrinterConnection("\\print-svr\4A_LASER")
$rc=AddPrinterConnection("\\print-svr\CCU_LJ1320")
$rc=AddPrinterConnection("\\print-svr\ER_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\CCU_LJ1320")
ENDIF
IF InGroup("ERCowPtr")
$rc=AddPrinterConnection("\\print-svr\3A_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3B_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3C_Konica")
$rc=AddPrinterConnection("\\print-svr\4A_LASER")
$rc=AddPrinterConnection("\\print-svr\CCU_LJ1320")
$rc=AddPrinterConnection("\\print-svr\ER_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\ER_LJ1320")
ENDIF
IF InGroup("3ATermPtr")
$rc=AddPrinterConnection("\\print-svr\3A_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\3A_LJ1320")
ENDIF
IF InGroup("3BTermPtr")
$rc=AddPrinterConnection("\\print-svr\3B_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\3B_LJ1320")
ENDIF
IF InGroup("3CTermPtr")
$rc=AddPrinterConnection("\\print-svr\3C_Konica")
$rc=SetDefaultPrinter("\\print-svr\3C_Konica")
ENDIF
IF InGroup("4ATermPtr")
$rc=AddPrinterConnection("\\print-svr\4A_LASER")
$rc=SetDefaultPrinter("\\print-svr\4A_LASER")
ENDIF
IF InGroup("CCUTermPtr")
$rc=AddPrinterConnection("\\print-svr\CCU_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\CCU_LJ1320")
ENDIF
IF InGroup("ERTermPtr")
$rc=AddPrinterConnection("\\print-svr\ER_LJ1320")
$rc=AddPrinterConnection("\\print-svr\ER_LJ1200")
ENDIF
IF InGroup("MatManPtr")
$rc=AddPrinterConnection("\\print-svr\matman_office_konica")
$rc=AddPrinterConnection("\\print-svr\matman_storeroom_konica")
ENDIF
IF InGroup("CathLabPtr")
$rc=AddPrinterConnection("\\print-svr\CathLab_LJ1320")
ENDIF
IF InGroup("PTInpatientPtr")
$rc=AddPrinterConnection("\\print-svr\PT_Speech_LJ1320")
$rc=AddPrinterConnection("\\print-svr\PT_LJ1320")
ENDIF
IF InGroup("CardioPulmonaryPtr")
$rc=AddPrinterConnection("\\print-svr\CardioPulmonary_LJ1320")
$rc=SetDefaultPrinter("\\print-svr\CardioPulmonary_LJ1320")
ENDIF
IF InGroup("Escorts_LaserPTR")
$rc=AddPrinterConnection("\\print-svr\escorts_laser")
ENDIF
IF InGroup("FiscalPtr")
$rc=AddPrinterConnection("\\print-svr\fiscal1320")
$rc=SetDefaultPrinter("\\print-svr\fiscal1320")
ENDIF
IF InGroup("NPUInpatientPtr")
$rc=AddPrinterConnection("\\print-svr\npu_lj1320")
ENDIF
IF InGroup("ImagingPtr")
$rc=AddPrinterConnection("\\print-svr\imag_mammo1")
$rc=AddPrinterConnection("\\print-svr\imag_ultrasound")
ENDIF
IF InGroup("InformationServicesPtr")
$rc=AddPrinterConnection("\\print-svr\is_4500")
ENDIF
IF InGroup("UtilizationReviewPtr")
$rc=AddPrinterConnection("\\print-svr\3A_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3B_LJ1320")
$rc=AddPrinterConnection("\\print-svr\3C_Konica")
$rc=AddPrinterConnection("\\print-svr\4A_LASER")
$rc=AddPrinterConnection("\\print-svr\CCU_LJ1320")
$rc=AddPrinterConnection("\\print-svr\UR_LASER")
$rc=SetDefaultPrinter("\\print-svr\UR_LASER")
ENDIF
IF InGroup("CoagClinicPtr")
$rc=AddPrinterConnection("\\print-svr\coag_clinic_laser")
ENDIF
IF InGroup("HealthyBeginningsPlusPtr")
$rc=AddPrinterConnection("\\print-svr\hbp_laser")
$rc=DelPrinterConnection("\\hbpdocs\hbp-laser")
ENDIF
IF InGroup("RadFileRoomPtr")
$rc=AddPrinterConnection("\\print-svr\RAD_FILEROOM_LASER_RTSIDE")
$rc=AddPrinterConnection("\\print-svr\RAD_FILEROOM_RECEPTION_LASER")
$rc=SetDefaultPrinter("\\print-svr\RAD_FILEROOM_RECEPTION_LASER")
ENDIF
IF InGroup("LabPtr")
$rc=AddPrinterConnection("\\print-svr\lab_laser")
ENDIF
; ###############################################
; BEGIN GROUP BASED SHORTCUTS & REG HACKS
?? "Processing Group Based Desktop Shortcuts"
IF ComputerInGroup('ParagonPACSWebstationComputers')=1
del "%USERPROFILE%\Desktop\Horizon Rad Station Test.url"
del "%USERPROFILE%\Desktop\Horizon Rad Station Live.url"
del "%USERPROFILE%\Desktop\Paragon WebStation for Physicians.url"
ENDIF
IF InGroup("MisysLabResultsTS")
IF EXIST ("%userprofile%\desktop\Misys Lab Results.rdp")
DEL "%userprofile%\desktop\Misys Lab Results.rdp"
ENDIF
$rc=wshShortcut("Misys Lab Results","\\somehosp.local\appdeploy\shortcuts\misys_lab_results.rdp", ,"\\somehosp.local\appdeploy\shortcuts")
ENDIF
IF InGroup("ExternalShortcutsDoctors")
$rc=wshShortcut("Misys Somerset Family Practice","\\somehosp.local\appdeploy\shortcuts\misys_somerset_family_practice.rdp", ,"\\somehosp.local\appdeploy\shortcuts")
$rc=wshShortcut("MAB","\\somehosp.local\appdeploy\shortcuts\MAB.rdp", ,"\\somehosp.local\appdeploy\shortcuts")
ENDIF
IF InGroup("NursingStaffSched")
$rc=WriteValue ("HKEY_CURRENT_USER\Software\VB and VBA Program Settings\VSPPGMSET\Settings","ABS558MQAP","963W554688","REG_SZ")
ENDIF
IF InGroup("CPEchoFileReadOnly", "CPEchoFileFullControl")
$rc=wshShortcut("Echo File","\\nas2\cardiopulmonary\echo file")
ENDIF
IF InGroup("ParagonScanners")
?? "Merging Paragon Scanner Registry Information"
shell 'regedit /s \\somehosp.local\netlogon\kixtart\visioneer9420-pgscan.reg'
ENDIF
IF GetUserOU=("OU=ParagonRestrictedUsers,DC=somehosp,DC=local")
$rc=wshShortcut("Caclulator","%systemroot%\system32\calc.exe",,"%systemroot%\system32")
ENDIF
IF GetUserOU=("OU=ParagonCow Users,OU=Paragon Cows,DC=somehosp,DC=local") OR GetUserOU=("OU=ParTerm Users,OU=ParagonTerminals,DC=somehosp,DC=local")
?? "Updating Wallpaper"
shell '\\somehosp.local\netlogon\bginfo\bginfo.exe \\somehosp.local\netlogon\bginfo\pgterm.bgi /timer:00 /nolicprompt'
ENDIF
; #######################################
; BEGIN SECURITY AUDIT & SPECOPS INFORMATION GATHERING
IF @inwin = 1 AND @productsuite <> 16
CALL "\\somehosp.local\netlogon\kixtart\remsome.kix"
ENDIF
IF @inwin = 1
$specops="\\somehosp.local\appdeploy\commonlogs\specopsclients.ini"
$rc=writeprofilestring($specops,'@WKSTA','Username','@USERID')
$rc=writeprofilestring($specops,'@WKSTA','IPAddress','@IPADDRESS0')
$rc=writeprofilestring($specops,'@WKSTA','MAC','@ADDRESS')
$rc=writeprofilestring($specops,'@WKSTA','Date','@DATE')
IF EXIST("%WINDIR%\SYSTEM32\SPECOPSDEPLOY")
$rc=writeprofilestring($specops,'@WKSTA','SpecopsClient','Yes')
$csever = GetFileVersion("%WINDIR%\SYSTEM32\SPECOPSDEPLOY\sogpproc.exe", "ProductVersion" )
$rc=writeprofilestring($specops,'@WKSTA','CSEVer',$csever)
ELSE
$rc=writeprofilestring($specops,'@WKSTA','SpecopsClient','No')
ENDIF
ENDIF
SHELL "\\somerset-dhcp\audit\scan\scan32.exe"
:end
Edited by tylan (2007-02-19 07:12 PM)
|
|
Top
|
|
|
|
#174056 - 2007-02-19 07:29 PM
Re: Problems with wshShortcut UDF
[Re: tylan]
|
Benny69
Moderator
   
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
You are calling the 'wshShortcut()' function in many places, are all of them causing a problem or is it just one? which one is it haning on?
|
|
Top
|
|
|
|
#174058 - 2007-02-19 07:49 PM
Re: Problems with wshShortcut UDF
[Re: Benny69]
|
tylan
Starting to like KiXtart
Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
|
That's what I showed in my previous post.
Actually, I may have fixed it. I download KiX 2010 453, and copied the files to the netlogon share. I was runnin 451. I also noticed that one of my DCs had high CPU utilization w/ lsass.exe. Maybe that was connected. I will keep monitoring, but the scripts seem to be working better.
|
|
Top
|
|
|
|
#174060 - 2007-02-19 08:58 PM
Re: Problems with wshShortcut UDF
[Re: Allen]
|
tylan
Starting to like KiXtart
Registered: 2005-11-17
Posts: 115
Loc: Johnstown, PA
|
Allen,
I had the UDF code from my local script in case the code got screwed up during the copy & paste. I thought putting in the code straight from the UDF Website could be seen as side stepping my code... Kind of like not showing my ACTUAL code.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(mole)
and 1300 anonymous users online.
|
|
|