Good morning Peter and thank you for your prompt reply,
The dcprint.xlsm “lives” in one of our virtual servers a path which all users have read/write rights.
As recommended, I also changed the settings in excel so as to allow macro-enabled spreadsheets. (no-luck)
I can also fire excel and word via mapbasic window via run command as a normal user.
Interesting enough I can only use run command and cmd functionalities in windows as an admin user only, and not an as normal user due to security rules. Could that be the issue?
Thank you very much again.
Stathis
Does it help if you start MapInfo Pro as an Administrator?
You can also try wrapping the “Run Program” statement and use Run Command to execute it in the scope of MapInfo Pro as opposed to the scope of your application.
That should be the same as running the statement through the MapBasic window.
Run Command "run program " + Chr$(34) + "exloc" + Chr$(34) + " " + Chr$(34) + "'path'\dcprint.xlsm" + Chr$(34)
From: mapi...@googlegroups.com <mapi...@googlegroups.com>
On Behalf Of StA
Sent: 29. juni 2021 12:01
To: MapInfo-L <mapi...@googlegroups.com>
Subject: Re: [MI-L] Mapbasic : could not execute -- program could not be run
This message originated Externally. Use proper judgement and caution with attachments, links, or responses. |
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mapinfo-l/e24c481c-dcfd-44f6-9e0e-0d8fc22efa1bn%40googlegroups.com.
good afternoon Peter and thank you for your email,
starting mapinfo as an admin didn't work
can you please expand on your suggestion as i don't fully understand it.
Thank you very much again
Stathis
Hi
Use this line:
Run Command "run program " + Chr$(34) + "exloc" + Chr$(34) + " " + Chr$(34) + "'path'\dcprint.xlsm" + Chr$(34)
instead of this line:
run program exloc + "'path'\dcprint.xlsm" (in this instance updates and prints dcprint)
It’s a wild guess as I can’t see how that should make a real difference.
I do assume that the string 'path' will be replace with the real path in your code, right?
You may also want to ensure that you have a space between the exloc and the xlsm file.
You can try to print this before executing it to ensure it looks fine:
Print "run program " + Chr$(34) + "exloc" + Chr$(34) + " " + Chr$(34) + "'path'\dcprint.xlsm" + Chr$(34)