Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Troubles with new installation

0 views
Skip to first unread message

Fosco

unread,
Jun 13, 2002, 3:14:17 AM6/13/02
to
It's time for a c:\format for my OS...
But first i have tried if all works in a new installation..
Win98se IE 5.5sp1 Wsh 5.6 and this script doesn't work.
It says the file is not associaded whit a programm
It's somewhat in the registry...if i import an old registry it works.
any clue ???

*.wsf

<JOB ID="openmydoc">
<REFERENCE GUID="{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}"/>

<script language="VBScript">
set WshShell = WScript.CreateObject("Shell.Application")
set oShell = WScript.CreateObject("WScript.Shell")
WshShell.Open(17)
set WshShell = Nothing
set oShell = Nothing
</SCRIPT>
</JOB>
--
Fosco


Michael Harris (MVP)

unread,
Jun 13, 2002, 11:46:38 AM6/13/02
to


Are you saying that *.wsf files aren't being recognized as being associated with WSH?

What is the default value of HKCR\.wsf (should be WSFFile). Is there a HKCR\WSFFile branch in the registry? Either of the IE5.5sp1 or WSH 5.6 installs should have created these registry entries...

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--


Fosco

unread,
Jun 13, 2002, 2:41:30 PM6/13/02
to
"Michael Harris (MVP)" > *.wsf


>Are you saying that *.wsf files aren't being recognized as being associated with WSH?

YES ( some *.vbs file also)

>What is the default value of HKCR\.wsf (should be WSFFile).

It is a "virgin" installation only IE+OE 5.5 & wsh 5.6 added
it seems regular ( apri stampa ecc is OK it is Italian for open print )

REGEDIT4

[HKEY_CLASSES_ROOT\WSFFile]
@="File di script Windows"

[HKEY_CLASSES_ROOT\WSFFile\DefaultIcon]
@="C:\\WINDOWS\\WScript.exe,2"

[HKEY_CLASSES_ROOT\WSFFile\Shell]

[HKEY_CLASSES_ROOT\WSFFile\Shell\Open]
@="&Apri"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Open\Command]
@="C:\\WINDOWS\\WScript.exe \"%1\" %*"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Open2]
@="A&pri in modalità prompt dei comandi"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Open2\Command]
@="C:\\WINDOWS\\Command\\CScript.exe \"%1\" %*"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Edit]
@="&Modifica"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Edit\Command]
@="C:\\WINDOWS\\Notepad.exe %1"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Print]
@="&Stampa"

[HKEY_CLASSES_ROOT\WSFFile\Shell\Print\Command]
@="C:\\WINDOWS\\Notepad.exe /p %1"

[HKEY_CLASSES_ROOT\WSFFile\ShellEx]

[HKEY_CLASSES_ROOT\WSFFile\ShellEx\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\WSFFile\ShellEx\PropertySheetHandlers\WSHProps]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"

[HKEY_CLASSES_ROOT\WSFFile\ShellEx\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"


This either doesn't work (*.vbs)

Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("C:\windows\notepad")
WScript.Echo oExec.Status

This instead works (*.vbs)

Set Shell = WScript.CreateObject ("Shell.Application")
Shell.Open "c:\programmi"
--
Fosco


Michael Harris (MVP)

unread,
Jun 13, 2002, 3:15:56 PM6/13/02
to
Let's deal with one problem at a time...

If you save the following as hello.wsf, does it run properly when you double-click it from Windows Explorer?

<job>
<script language="vbscript">
MsgBox "hello..."
</script>
</job>

It's not clear to me whether your probalem is that *no* *.wsf files will execute, or that they do execute, but some don't work properly, especially since you are now bringing up issues with *some* *.vbs files...

Fosco

unread,
Jun 14, 2002, 3:24:00 AM6/14/02
to
"Michael Harris (MVP)"

>Let's deal with one problem at a time...

<job>
<script language="vbscript">
MsgBox "hello..."
</script>
</job>

Thanks Michael this above works.....

>It's not clear to me whether your problem is that *no* *.wsf files will execute,


>or that they do execute, but some don't work properly, especially since
>you are now bringing up >issues with *some* *.vbs files...

It is drive me crazy, some vbs or wsf works some not
Here they that's works :

*.vbs
set WshShell = CreateObject("WScript.Shell")
WshShell.run"c:\windows\notepad.exe"
WScript.Sleep 500
WshShell.SendKeys"Hello"

*.vbs
Set oShell = CreateObject("WScript.Shell")
sProgramFiles = oShell.RegRead _
("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir")
oShell.run(sProgramFiles)

*.vbs


Set Shell = WScript.CreateObject ("Shell.Application")

Shell.ControlPanelItem" Modem.cpl"

*.wsf
<JOB ID="openmydoc">
<REFERENCE GUID="{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}"/>
<script language="VBScript">
set WshShell = WScript.CreateObject("Shell.Application")

WshShell.FileRun
</SCRIPT>
</JOB>

This dont work

*.wsf
<JOB ID="openmydoc">
<REFERENCE GUID="{50A7E9B0-70EF-11D1-B75A-00A0C90564FE}"/>
<script language="VBScript">
set WshShell = WScript.CreateObject("Shell.Application")

WshShell.Open(0)
</SCRIPT>
</JOB>

*.vbs


Set Shell = WScript.CreateObject ("Shell.Application")
Shell.Open "c:\"

( Shell.Open ?????)

Correction from the precedent post this either not works

Set Shell = WScript.CreateObject ("Shell.Application")
Shell.Open "c:\programmi"

'' ( programmi is correct so)

Some file gives error 8007002 or ( i translate in my bad English)

The file is not associated with any Program for the execution ....
It's maybe Active Desktop involved ???
The only difference between here where all works and the new is
VisulBasic 6 here installed ( but i think this is not the matter)

As i said if i take this old registry from this old OS and put it in the new
all works fine
( its real mess for me go trough and compare the two registry)
Sorry for my bad English and thanks for the patience
--
Fosco


Michael Harris (MVP)

unread,
Jun 14, 2002, 11:22:00 AM6/14/02
to
So if I follow all this correctly, it would appear that the only consistent problem you have on a clean Win98SE box with IE5.5sp1 and WSH 5.6 (and no mods to the registry) is that the Shell.Application's Open method doesn't work.

The wsf files that use a <reference> element don't error on that element, so the problem isn't related to extracting typelib info. So you probably don't need to look at anything under HKCR\TypeLib\...

If it were me, I'd be looking for something different under the HKCR\Shell.Application branch and the HKCR\CLSID\{...} branch related to it via the HKCR\Shell.Application\CLSID key's default value.

Michael Harris (MVP)

unread,
Jun 14, 2002, 11:34:41 AM6/14/02
to
So if I follow all this correctly, it would appear that the only consistent problem you have on a clean Win98SE box with IE5.5sp1 and WSH 5.6 (and no mods to the registry) is that the Shell.Application's Open method doesn't work.

The wsf files that use a <reference> element don't error on that element, so the problem isn't related to extracting typelib info. So you probably don't need to look at anything under HKCR\TypeLib\...

If it were me, I'd be looking for something different under the HKCR\Shell.Application branch and the HKCR\CLSID\{...} branch related to it via the HKCR\Shell.Application\CLSID key's default value.

--

Fosco

unread,
Jun 14, 2002, 3:19:49 PM6/14/02
to
"Michael Harris (MVP)"

I give up.
I have tried all the possible and the only way it works
is to import an old registry....
Much appreciated your help anyway.
Thanks
--
Fosco

0 new messages