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

File association to a VBS

607 views
Skip to first unread message

Dudule

unread,
Jan 2, 2011, 4:17:24 AM1/2/11
to
Happy new year to everybody....
I got a small problem to associate a file extension to a vbs script (under
XP).
After file extension association to a VBS, if I click on the file, Windows
XP display a message that the file is not a valid win32
application....
Is it possible to start a VBS with any file extension association ?? and how
??
Many thanks for any answer...

Dave "Crash" Dummy

unread,
Jan 2, 2011, 8:03:26 AM1/2/11
to

You have to associate the extension with wscript or cscript followed by
your script name, i.e. "c:\path\wscript.exe d:\path\script.vbs %1." I've
never tried that specifically, but I associate a custom extension with
an HTA script using
C:\Windows\SysWOW64\mshta.exe "E:\books\tools\libcheck.hta" %1
--
Crash

One man's weed is another man's wildflower.

Mayayana

unread,
Jan 2, 2011, 8:46:19 AM1/2/11
to
You mean that you made up an unused extension
and want it to be treated as a VBS file. I don't
see the point. If you make it like a VBS then it is
a VBS, so why not just call it VBS?

In any case, it's all in the Registry under HKCR.
If you look under HKCR\.vbs you'll probably see that
the official file "class" name is "vbsfile". If you then
look under HKCR\vbsfile you'll see all the info. Windows
uses to handle the extension. So if you want you filetype
to act like a VBS then just set the default value in the
extension key to the default value in the .vbs key:

HKCR\.vbs default value: vbsfile
HKXR\.xyz default value: vbsfile

.xyz would now be an alias of VBS.

--
--
"Dudule" <ni...@niconnu.com> wrote in message
news:4d2042da$0$1584$426a...@news.free.fr...

Dudule

unread,
Jan 2, 2011, 1:33:14 PM1/2/11
to

"Dudule" <ni...@niconnu.com> a écrit dans le message de news:
4d2042da$0$1584$426a...@news.free.fr...

Thanks to everybody,
I associated the link:
c:\windows\system32\wscript.exe "e:\mypath\script.vbs" %1
to the open statment in the file association extensions...
And everything works...
Thanks again and happy new year


0 new messages