Z:\root\vb_shortcut>cscript mk_shortcut.vbs "temp" "Z:\root\vb_shortcut
\test.txt " "."
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
2599: assertion failed "(*(const char*)_DBUS_FUNCTION_NAME) != '_'"
file "dbus-connection.c" line 2877 function
_dbus_connection_read_write_dispatch
err:ole:CoGetClassObject class {6c736db1-bd94-11d0-8a23-00aa00b58e10}
not registered
err:ole:CoGetClassObject no class object {6c736db1-
bd94-11d0-8a23-00aa00b58e10} could be created for context 0x1
Z:\root\vb_shortcut\mk_shortcut.vbs(10, 1) P: 0x8002801D
I've installed Windows Script 5.6 for Windows XP into my wine
installation. Part of my problem may be that I'm running wine with the
windows version set to Windows 98. The reason I'm doing this is I
can't get cscript to work with my Windows version set to XP. Here is
the error I get when just trying to run cscript at the cmd prompt in
wine with the Windows version set to XP:
Z:\root\vb_shortcut>cscript
fixme:ole:CoInitializeSecurity ((nil),-1,(nil),(nil),0,3,(nil),0,
(nil)) - stub!
Here is a copy of my vb script. It is a script to create a shortcut.
This is really all I need to do. If anyone knows of a another way to
create a shortcut that works in wine using a script please let me
know.
'VSScript that can be run to create a shortcut
'Usage (from a cmd line): cscript mk_shortcut.vbs "<shortcut name>"
"<shortcut target>" "<shortcut location>"
'Example: cscript mk_shortcut.vbs "notepad_shortcut" "C:\Windows
\Notepad.exe" "U:\some_directory"
'TODO: Add some error checking (currently none since I don't know how
in VBScript)
Dim WSHShell, fs
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set fs = WScript.CreateObject("Scripting.FileSystemObject")
Function MakeDesktopShortcut( name, target, shortcut_location )
Dim Shortcut,StartupPath
Set Shortcut = WSHShell.CreateShortcut(shortcut_location & "\" & name
& ".lnk")
Shortcut.TargetPath = target
StartupPath = fs.GetParentFolderName( target )
If fs.FolderExists( StartupPath ) then
Shortcut.WorkingDirectory = StartupPath
End If
Shortcut.Save
End Function
Dim Shortcut_name, Shortcut_target, Shortcut_location
Shortcut_name = WScript.Arguments.Item(0)
Shortcut_target = WScript.Arguments.Item(1)
Shortcut_location = WScript.Arguments.Item(2)
MakeDesktopShortcut Shortcut_name, Shortcut_target, Shortcut_location
Thanks in advance for any help!
Mike
First, please file your vb script problem as a bug at http://bugs.winehq.org
so we can look at that. Be sure to mention what version of
Linux and what version of Wine you're using.
But while you're waiting for us to look at that, you might try using
http://www.autohotkey.com/ to write your script.
I think that works in Wine.
- Dan