Page 1 of 1 1
Topic Options
#195494 - 2009-08-20 08:41 PM VBS Script from Kix32 ( Newbie Alert)
DemoDog Offline
Fresh Scripter

Registered: 2009-08-20
Posts: 9
Loc: Washington DC
All;
Trying to run fieldcrew1.vbs from kix32;

$scrip = Fieldcrew1.vbs
if not exist('c:\documents and settings\@userid\$scrip')
copy @ldrive + '\$scrip' 'c:\documents and settings\@userid\'
SHELL "wscript 'c:\documents and settings\@userid\' + $scrip"
endif

Also tried;
$scrip = Fieldcrew1.vbs
SHELL "wscript '@ldrive' + $scrip"
endif

I know fieldcrew1.vbs works, simply adding a printer , but ... I don't get the printer from kix32.
list fieldcrew1.vbs

Set WSHNetwork = CreateObject("WScript.Network")
WSHNetwork.AddWindowsPrinterConnection "\\pserver1\6thFloorFieldCrew1"

end list

I'd sorely luv to convert this to a kix script. I located and d/l'ed the UDF vbs2kix , but kix32 vbs2kix fieldcrew1.vbs fieldcrew1.kix returns;
ERROR : IDispatch pointers not allowed in expressions!
Script: fieldcrew1.vbs
Line : 7

Help?
atb


Edited by DemoDog (2009-08-20 09:23 PM)
Edit Reason: updated question
_________________________
If Stupidity got us into this mess, then why can't it get us out?
Will Rogers

Top
#195496 - 2009-08-20 09:50 PM Re: VBS Script from Kix32 ( Newbie Alert) [Re: DemoDog]
DemoDog Offline
Fresh Scripter

Registered: 2009-08-20
Posts: 9
Loc: Washington DC
Never mind ...
IF addprinterconnection("\\pserver1\6thFloorFieldCrew1")= 0

worx like a charm, forget that VBS stuff, this is much easier.
atb
_________________________
If Stupidity got us into this mess, then why can't it get us out?
Will Rogers

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1179 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.052 seconds in which 0.024 seconds were spent on a total of 13 queries. Zlib compression enabled.

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