Clayton
(Fresh Scripter)
2004-10-29 05:41 PM
wshShortcut problems

I've been using wshshortcut for a while with no problems. Just the other day I started getting an error on my line with the wshshorcut command.
I have the 1.3 wshshcortcut in my udf.kix that's called from my login.kix.

login

Break on
Call "@SCRIPTDIR\udf.kix"

If InGroup("ADM") Use h: "\\tpaprime01\ADM" EndIf
If InGroup("ACCT") Use h: "\\tpaprime01\ACCT" EndIf
If InGroup("CORP") Use h: "\\tpaprime01\CORP" EndIf
If InGroup("MEDMAL") Use h: "\\tpaprime01\MAL" EndIf
If InGroup("REALAND") Use h: "\\tpaprime01\REALAND" EndIf
If InGroup("ENV") Use h: "\\tpaprime01\ENV" EndIf
If InGroup("CORP") Use h: "\\tpaprime01\CORP" EndIf
If InGroup("FLOATER") Use h: "\\tpaprime01\DATA" EndIf
If InGroup("INS") Use h: "\\tpaprime01\INS" EndIf
If InGroup("LABOR") Use h: "\\tpaprime01\LABOR" EndIf
If InGroup("LANDATA") Use h: "\\tpaprime01\LANDATA" EndIf
If InGroup("BANKRUPT") Use h: "\\tpaprime01\BANKRUPT" EndIf
If InGroup("LDATA") Use q: "\\tpaprime01\LANDATA" EndIf

Use U: '\\tpaprime01\'+@USERID+'$$'
Use G: \\tpaprime01\data
Use J: \\tpaprime01\vol1
Use S: \\tpaprime\shared
Use W: \\tpaprime01\word
Use X: \\tpaprime01\apps

SetTime( "\\tpaprime" )

AddPrinterConnection ("\\tpaprime01\PRT 1900")
AddPrinterConnection ("\\tpaprime01\PRT 1901")
AddPrinterConnection ("\\tpaprime01\PRT 1902")
AddPrinterConnection ("\\tpaprime01\PRT 1903")
AddPrinterConnection ("\\tpaprime01\PRT 1904")
AddPrinterConnection ("\\tpaprime01\PRT 1905")
AddPrinterConnection ("\\tpaprime01\CPR 1906")
AddPrinterConnection ("\\tpaprime01\CPR 1907")
AddPrinterConnection ("\\tpaprime01\PRT 1908")
AddPrinterConnection ("\\tpaprime01\PRT 1909")
AddPrinterConnection ("\\tpaprime01\PRT 2000")
AddPrinterConnection ("\\tpaprime01\PRT 2001")
AddPrinterConnection ("\\tpaprime01\PRT 2002")
AddPrinterConnection ("\\tpaprime01\PRT 2003")
AddPrinterConnection ("\\tpaprime01\PRT 2004")
AddPrinterConnection ("\\tpaprime01\PRT 2005")
AddPrinterConnection ("\\tpaprime01\PRT 2006")
AddPrinterConnection ("\\tpaprime01\PRT 2007")
AddPrinterConnection ("\\tpaprime01\PRT 2008")
AddPrinterConnection ("\\tpaprime01\PRT 2009")
AddPrinterConnection ("\\tpaprime01\CPR 2010")
AddPrinterConnection ("\\tpaprime01\CPR 2011")
AddPrinterConnection ("\\tpaprime01\CPR 2012")
AddPrinterConnection ("\\tpaprime01\CPR 2013")
AddPrinterConnection ("\\tpaprime01\PRT 2014")
AddPrinterConnection ("\\tpaprime01\PRT 2015")
AddPrinterConnection ("\\tpaprime01\PRT 2016")
AddPrinterConnection ("\\tpaprime01\PRT 2017")

;**************************E-Transcript Viewer********************************************************************
If NOT Exist('%windir%\etrnview.exe')
Run "\\tpaprime\installs\etranscript\envsetup.exe"
Sleep 1
SendKeys ("~Y")
Sleep 3
SendKeys ("{ENTER}")
EndIf
;*****************************************************************************************************************

;***********************************Desktop Shortcuts*************************************************************

$=wshShortcut("Choice Mail","http://choicemail:8080/login.html")


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

Exit


Anyone have any ideas why this quit working??
Thanks!


ShawnAdministrator
(KiX Supporter)
2004-10-29 05:45 PM
Re: wshShortcut problems

Did by any chance (maybe without your knowledge) did someone slip in a newer version of Kixtart ?

ShaneEP
(MM club member)
2004-10-29 05:47 PM
Re: wshShortcut problems

Did you notice what the error that you get is?

Clayton
(Fresh Scripter)
2004-10-29 05:49 PM
Re: wshShortcut problems

Same version 4.22 - I'm the only one who runs the site.

Unknown Command [wshShortcut]!


I'm also having a problem with the script randomly not running at login. I can run the script from command line and it works. Wonder if these are related in someway.

All are XP machines without SP2.


ShawnAdministrator
(KiX Supporter)
2004-10-29 05:57 PM
Re: wshShortcut problems

I would think this line is not resolving correctly:

Call "@SCRIPTDIR\udf.kix"

Would suggest you trace-out @SCRIPTDIR like this:

? "ScriptDir=" @SCRIPTDIR

To make sure its resolving correctly ... what OS's you running ? Does this appear on just one type of OS ?




Clayton
(Fresh Scripter)
2004-10-29 06:13 PM
Re: wshShortcut problems

I was thinking along those lines. I put the direct path of the udf and it worked. Crazy why it stopped resolving like that. Thanks!

Cybex
(Getting the hang of it)
2004-10-29 07:25 PM
Re: wshShortcut problems

Clayton,
Could you please edit your post and remove about 15 of the "*"'s from the long lines. It messes up the page sizes and forces scrollbars.

I guess I'll be the good cop since it's almost Hallows Eve.


Kdyer
(KiX Supporter)
2004-11-01 02:27 PM
Re: wshShortcut problems

Just a quick question.. Do all of your users need all 28 Printers??

Kent