I’d like to open my file similar to viewing files when stating the full path in “cmd” prompt.
The operating system should know which default program to use in viewing the file.
I am currently using application.executeProgram(newFileName); method.
But when I try to run the piece of code above, “Message: Execute of external program failed” is displayed.
The newFileName parameter is a complete file and path name.
I tried this and it works well for Smart Client from Developer, but not on Smart Client from Servoy App Server.
I would like to clear the cache of the .servoy folder by the onCloseSolution function and made these codelines:
.
.
if(utils.stringPatternCount(globals.OSname,'Windows') == 1){
var file = 'c./temp/clear_cache.bat';
var text = 'DEL /Q "%USERPROFILE%/.servoy"';
plugins.file.writeTXTFile(file,text);
application.executeProgramInBackground('rundll32', 'url.dll,FileProtocolHandler',file);
}
.
.
jcompagner:
why do you want to delete the .servoy folder?
Because I have daily updates for that solution and some changes wasn’t available until deleted the .servoy folder!?
Not on all Smart Clients, but there are always clients displaying stuff of the old version.
jcompagner:
is the file generated in the temp folder?
Yes it is physically in the temp direction.
Ahh…, I’m seeing an error in typing the code in the post. In my function I have: ‘c:/temp/clear_cache.bat’ !!
the need for deleting the smart client folder shouldnt be needed,
also that has a cost because many things must constantly updated again, not the mention that user settings (like window bounds) are constantly deleted.
Buf if you have a case where you see that a client uses an old solution when there is really a new one when it starts the smart client please let us know.
Also, when you can reproduce this, try to see what happens if you flush the solution(s) on the admin page (the “flush” button next to the solution on the Solutions page of the admin page).
Flushing the solution internally ups the version identifier, which should trigger a update of the client cache when they start a new client.
The upping of the internal version identifier should happen automatically when you import a new version, but for the sake of argument, please try this when you can reproduce the issue.