#153732 - 2005-12-20 07:54 PM
Re: $shell = createobject("wscript.shell") not working as it should...
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
What does the following yield on a failure? Code:
$oShell = CreateObject("WScript.Shell") ? @error + " " + @serror ? "VarType = " + vartypename($oShell)
|
|
Top
|
|
|
|
#153736 - 2005-12-21 06:26 PM
Re: $shell = createobject("wscript.shell") not working as it should...
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Quote:
I have seen one other UDF (softlink), but that failed completely for me.!
I don't see how that could be. Perhaps you were unable to get the right syntax of the command or something of that nature.
Please give it another try and add some @SERROR stuff to the code if needed. It should work just fine.
SoftLink() - Creates a shortcut anywhere http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=82353
|
|
Top
|
|
|
|
#153738 - 2005-12-22 02:01 PM
Re: $shell = createobject("wscript.shell") not working as it should...
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Sounds to me like your VBS or the COM CreateObject functionality is corrupt or missing. Try using CreateObject for a different non-VBS object and see if it also fails. If not, the try reinstalling VBS and see what happens.
|
|
Top
|
|
|
|
#153743 - 2005-12-22 08:36 PM
Re: $shell = createobject("wscript.shell") not working as it should...
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Found a couple minor issues with SoftLink but they should be fixed by the time you get back from vacation.
As for the COM thing, yeah I'd fix it.
You can also try installing VBScript again - quick and easy and should repair any issues with it by doing the install
Windows Script 5.6 for Windows XP and Windows 2000 http://www.microsoft.com/downloads/detai...;displaylang=en
If it's an XP system you can also run DCOMCNFG Then drill down to Component Services, then Computers, then My Computer, then COM+ Applications and if something is not registered it should prompt and tell you and offer to register it for you. Maybe run an up to date Anti-Spyware tool against the system as well.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|