Bug 292381 - Calligra StartApp.vbs
Summary: Calligra StartApp.vbs
Status: RESOLVED FIXED
Alias: None
Product: calligracommon
Classification: Applications
Component: general (show other bugs)
Version: 2.4-snapshots
Platform: Unlisted Binaries Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: Calligra Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-25 10:54 UTC by Vasileios Anagnostopoulos
Modified: 2013-02-21 09:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vasileios Anagnostopoulos 2012-01-25 10:54:37 UTC
Version:           2.4-snapshots (using Devel) 
OS:                MS Windows

Systems under question WinXP/SP3/x86

The installation of http://heap.kogmbh.net/downloads/calligra_windows/calligra_2.3.86.2.msi and usgae was successful on my Laptop.

On my desktop though it seems that clicking the shortcuts does not work as expected. Investigating showed that vbscript was not registered and after doing the correct registration, from the command prompt  I can execute

cscript startApp.vbs calligrawords

however the problem persists for the shortcuts.

when I put a debug MsgBox I found out that no arguments (found out with a command line .lnk parser) are passed to the VBscript.

I could reproduce this behavior by running e.g. startApp.vbs calligrawords , no params are passed tho the script.  cscript seems to make the params available.

Reproducible: Couldn't Reproduce


Actual Results:  
clicking desktop shortcuts does not work

Expected Results:  
calligra suite apps should start

I understand that this is a windows or even setup specific program. 

Could you

1. Integrate calligra to windows-kde installer?
2. Could you create the shortcuts in another way?

Thank you very much for your effort. On my laptop, I uninstalled the proprietary office suite I had on it and use another open source suite and calligra.
Comment 1 Stuart Dickson 2012-01-26 16:41:11 UTC
Hi Vasileios,

Could you confirm for me whether both your desktop and laptop are running Windows XP SP3? 

It is interesting how you say vbscript was not registered correctly, I will try to investigate this further. Could you tell me how you went about registering vbscript? I'm wondering whether the association with cscript and .vbs files excludes is responsible for the parameters being excluded, for example?

Certainly we are keen for Calligra to be integrated with the kde-windows installer, although at this point, as it's still a little unstable on Windows, the focus has been on stability.

Thank you for your interest in Calligra, and for your feedback! :)
Comment 2 Vasileios Anagnostopoulos 2012-01-27 13:20:32 UTC
First of all, it is not Calligra's fault.
Second, my report is very descriptive. Fortunately my Strawberry perl installation (I excluded of course from the path) had registered .pl extension and created startup scripts in perl. If you decide to require a perl installation, easiliy the startapp.vbs can be converted to .pl

e.g. my flow.pl file reads as

$x= "env.bat " . "calligraflow --style windowsvista " . "@ARGV";
system("$x");

and I created  shortcuts with proper icons (for words/stage/tables/krita) for the corresponding perl scripts.


Registering vbscript is done through an elevated command prompt (run the cmd as administrator) by running

regsvr32.exe c:\windows\system32\vbscript.dll

In any case my windows setup is messed and it is definitely not calligra's fault. So I do not consider it as bug report.

My laptop is less messed (no devel work on it). But it would be helpful for me not to include a .vbs file or at least add cscript infron of the vbs file.

It is interesting that running a vbscript without cscript passes no arguments (I cannot imagine why in my case)
For perl, things work as expected with the help of @ARGV.

E.g. 

words.pl myfile.odt 

works from command line as expected (without putting perl in fron of it).

Possibly is something I messed but since I am a FOSS admirer and definitely not a windows expert I will not lose my sleep if vbs does not work. Perl works and I am happy.

If you want to investigate something further I'll do my best to help.
Comment 3 ssimon 2012-04-24 07:39:43 UTC
I too have suffered from Calligra not starting as expected. I installed Calligra on my Dell XPS M1710 laptop running Windows 7. The installation process appeared to work as expected although I would have liked the option to place the icons on my desktop or not.

Once the installation process had finished I attempted to open each of the applications in turn but was unable to do so. All I observed was a StartApp.vbs error. I checked to see StartApp.vbs actually exists which it does. I then went to the program folders and tried the the actual application link which threw up another error (sorry I have uninstalled Calligra so can't check what the error was) which was asking for another file. This file appeared to be missing from its location. So it appears that there are a number of files not linked as expected and therefore Calligra doesn't work as it should.

If these links could be corrected and uploaded I will give another try.
Comment 4 Vasileios Anagnostopoulos 2012-04-24 08:48:02 UTC
I have already solved the problem by downloading a specific registry file.

Is the solution
http://www.sevenforums.com/windows-updates-activation/196011-cscript-error-cant-find-script-engine-vbscript-alternate-solution.html"

not working for you?
Comment 5 Vasileios Anagnostopoulos 2012-04-24 08:49:59 UTC
Here is the link I used (finally found it and enjoyed calligra)

http://www.nilpo.com/2009/07/windows-xp/error-there-is-no-script-engine-for-file-extension/
Comment 6 Stuart Dickson 2012-04-24 09:03:54 UTC
Thank you for your work in identifying a solution to this problem, Vasileios.

There is a solution I will be investigating to remove the vbscript/batch file dependency, either replacing them with a launcher executable, or incorporating some of that functionality into the main app executables. I'm afraid I hadn't pursued a perl solution as there would be less chance that folks might have it installed.
Comment 7 ssimon 2012-04-24 14:51:30 UTC
Many thanks for the solutions provided thus far however they didn't resolve this issue. Just to reitterate the error I received and hopefully make clear points I was sketchy about.

On clicking any of Calligra application icons on my desktop I receive the error dialogue message:

"C:\Program Files\Calligra\StartApp.vbs"
"Application not found"

"OK" clears this message.

I have checked and the "StartApp.vbs" script is located in the main Calligra folder. Also I have looked inside the StartApp.vbs script and provide its contents below:

"Set wshShell = CreateObject("WScript.Shell") 
Set oArgs=wscript.Arguments
Dim sArguments
sArguments=" "
For each item in oArgs
	sArguments = sArguments & item & " "
Next
WshShell.Run "env.bat " & sArguments, 0, FALSE
Set wshShell = Nothing"

Perhaps someone skilled in these things could tell me if there is a problem with the script or not.

I then went to Program Files - Calligra - bin. On selecting any of the Calligra applications I received the error dialogue message:

"The program can't start because komain.dll is missing from your computer. Try reinstalling the program to fix this program."

"OK" clears this message. 

I have attempted to reinstall calligra four or five times but to no avail. Also the file 

A search of my system shows the file "komain.dll" resides in the "lib" folder.

So from my limited understanding of programming I would suggest there are at least two seperate problems here one with the desktop icon links and the other with the links on the main program icons.

I hope this makes things clearer and any help would be appreciated.
Comment 8 Alan Horkan 2012-10-11 13:06:18 UTC
I had pretty much the same problem. 

In my case it is because I deliberately set VBS files to open as text files, rather than execute. Strangely this is the first time it is has ever been a problem. Hopefully things will move to a less brittle system, more like KDE Windows, which (mostly) works for me.
Comment 9 Halla Rempt 2012-10-11 16:00:22 UTC
Actually, the little vbs script + env.bat is exactly what replicates the kde-windows kdeenv.bat script: it sets the paths and system variables that any kde app needs. There's some work going on making it work better in kde windows community, but it's quite tricky. Settings those variables from the exe's main itself doesn't work, for instance.
Comment 10 Halla Rempt 2013-02-21 09:57:14 UTC
Hi,

We fixed this for 2.6.0 :-)