Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

Getting the error :- Variable is undefined: 'WScript'

3.679 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Balaram Barange

ungelesen,
08.06.2005, 00:22:4308.06.05
an

Hi All,

I am calling custom vbscript function from my installer.the script alone
works fine but when called from the installer gives following error

Error 1720.There is a problem with this Windows Installer package. A script
required for this install to complete could not be run. Contact your support
personnel or package vendor.
Custom action caInstallSetting

"script error -2146827788, Microsoft VBScript runtime error: Variable is
undefined: 'WScript' Line 171, Column 16"
can some body suggest me the solution
--
Thanks and Regards
Balaram Barange
Persistent Systems Pvt Ltd


Torgeir Bakken (MVP)

ungelesen,
08.06.2005, 02:33:1708.06.05
an
Balaram Barange wrote:

> I am calling custom vbscript function from my installer.the script alone
> works fine but when called from the installer gives following error
>
> Error 1720.There is a problem with this Windows Installer package. A script
> required for this install to complete could not be run. Contact your support
> personnel or package vendor.
> Custom action caInstallSetting
>
> "script error -2146827788, Microsoft VBScript runtime error: Variable is
> undefined: 'WScript' Line 171, Column 16"
> can some body suggest me the solution

Hi,

Could you please post script line 171, the one that fails?


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Jon

ungelesen,
08.06.2005, 03:11:1008.06.05
an
Also post details of which package you are using to create the installer

Jon


"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message
news:eWCoWS$aFHA...@TK2MSFTNGP14.phx.gbl...

Balaram Barange

ungelesen,
08.06.2005, 04:13:2608.06.05
an
I am using installshield 10.5 and the script line was
Set oShell = WScript.CreateObject("WSCript.shell")
actually the problem is when I execute the script directly it works
but when I run it in custom action with installer then it gives that error

"Balaram Barange" <balaram...@persistent.co.in> wrote in message
news:%239VxIG%23aFH...@TK2MSFTNGP15.phx.gbl...

Adam Piggott

ungelesen,
08.06.2005, 06:37:2508.06.05
an
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Balaram Barange wrote:
> I am using installshield 10.5 and the script line was
> Set oShell = WScript.CreateObject("WSCript.shell")

If the case of the quoted line is accurate, the "WSCript" will be what's
causing the problem, it should be "WScript" - WSH can be picky about text case.

HTH,


Adam Piggott,
Proprietor,
Proactive Services (Computing).

- --
Please replace dot invalid with dot uk to email me.
Apply personally for PGP public key.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFCpspl7uRVdtPsXDkRAoHwAKCDoKU5GEpdceLC8O1yA/Qo4bpuugCfemEb
ud93K61MN9IhOJnTXythEi8=
=pv/G
-----END PGP SIGNATURE-----

Balaram Barange

ungelesen,
08.06.2005, 06:45:0908.06.05
an
Set oShell = WScript.CreateObject("WSCript.shell")
^ it giving error here

"Balaram Barange" <balaram...@persistent.co.in> wrote in message

news:%23jMIEHA...@TK2MSFTNGP12.phx.gbl...

Torgeir Bakken (MVP)

ungelesen,
08.06.2005, 07:02:5508.06.05
an
Balaram Barange wrote:

> Set oShell = WScript.CreateObject("WSCript.shell")
> ^ it giving error here
>

Hi,

Remove the WScript. part, use this instead:

Set oShell = CreateObject("WScript.Shell")


As your MSI custom action vbscript is not hosted by wscript.exe
/cscript.exe, you cannot use WSH's builtin WScript object
(WScript.Sleep, WScript.Quit, WScript.CreateObject etc.)

Jon

ungelesen,
08.06.2005, 07:47:1908.06.05
an
Try using the vbscript "CreateObject"

ie

Set oShell = CreateObject("WScript.Shell")

Jon

"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message

news:uvrbDpBb...@TK2MSFTNGP10.phx.gbl...

Jon

ungelesen,
08.06.2005, 07:51:5908.06.05
an
oops .. looks like you said that already

"Jon" <Email_...@SomewhereOrOther.com> wrote in message
news:%23iWfk$BbFHA...@TK2MSFTNGP14.phx.gbl...

THEDEVMAN

ungelesen,
10.06.2005, 15:25:4510.06.05
an
That error 1720 is a permission error on the local computer. It means
you don't have the proper rights needed to install an application. I
ran into these issues when I first started installing windows 2000 with
office 2000 in a domain. All the standard users would logon and it
would attempt to create the custom properties for office and the users
wouldn't have the proper permissions to the workstation and it would
give an Error 1720.

Shweta Choudhary

ungelesen,
15.06.2005, 01:48:2615.06.05
an

Which dll file need to be added to use
WScript.CreateObject("WScript.Network")
pls guide.


*** Sent via Developersdex http://www.developersdex.com ***

Richard Mueller [MVP]

ungelesen,
15.06.2005, 18:19:0115.06.05
an
Shweta Choudhary wrote:

> Which dll file need to be added to use
> WScript.CreateObject("WScript.Network")
> pls guide.

The WshNetwork object comes with WSH (Windows Script Host). It's probably in
vbscript.dll. However, it should be available on any client with Windows
2000 or above, and any other 32-bit client (Window 95/98/ME or NT) with
DSClient installed. If any client does not have WshNetwork, then WSH needs
to be installed.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab web site - http://www.rlmueller.net
--


Michael Harris (MVP)

ungelesen,
15.06.2005, 19:30:4815.06.05
an
> The WshNetwork object comes with WSH (Windows Script Host). It's
> probably in vbscript.dll. ...

The only creatable object in vbscript.dll is "VBScript.RegExp" (VBScript
code can use the syntactic sugar ...new RegExp or a full
CreateObject("VBScript.RegExp").

Wsh objects (with "WScript.*" progids) are implemented in wshom.ocx.

Scrrun.dll implements the "Scripting.*" progids like the FSO and Dictionary
objects.

Scrobj.dll implements the "Scriptlet.Typelib" progid.

--
Michael Harris
Microsoft MVP Scripting


Al Dunbar [MS-MVP]

ungelesen,
20.06.2005, 22:50:5720.06.05
an

"Shweta Choudhary" <shweta.c...@lntinfotech.com> wrote in message
news:uoRva3Wc...@tk2msftngp13.phx.gbl...

>
>
> Which dll file need to be added to use
> WScript.CreateObject("WScript.Network")
> pls guide.

If the above line is failing, try it like this:

CreateObject("WScript.Network")

/Al


0 neue Nachrichten