Mar 1, 2023 Replies: 5 B4X: Dim jo As JavaObject jo.InitializeStatic("java.lang.Runtime") jo.RunMethodJO("getRuntime", Null).RunMethod("exec", Array("attrib +H <path_to_your_file>")) Click to expand...
B4X: Dim jo As JavaObject jo.InitializeStatic("java.lang.Runtime") jo.RunMethodJO("getRuntime", Null).RunMethod("exec", Array("attrib +H <path_to_your_file>"))
aminoacid Well-Known Member Licensed User Longtime User Mar 2, 2023 #2 Very nice. But just curious to know if there is any reason why you would not want to do the same thing with jShell?
Very nice. But just curious to know if there is any reason why you would not want to do the same thing with jShell?
aeric Expert Licensed User Longtime User Mar 2, 2023 #3 aminoacid said: Very nice. But just curious to know if there is any reason why you would not want to do the same thing with jShell? Click to expand... I haven't tried yet. Will take a look when I find time. Do you already have sample?
aminoacid said: Very nice. But just curious to know if there is any reason why you would not want to do the same thing with jShell? Click to expand... I haven't tried yet. Will take a look when I find time. Do you already have sample?
aminoacid Well-Known Member Licensed User Longtime User Mar 2, 2023 #4 aeric said: I haven't tried yet. Will take a look when I find time. Do you already have sample? Click to expand... No, but I have used jShell to run various Linux shell commands, so I am assuming that it will work with "DOS" commands like "attrib" too. I'll look into it when I get a chance. I was just curious to know if there are any advantages/disadvantages of using one technique over the other. Last edited: Mar 2, 2023
aeric said: I haven't tried yet. Will take a look when I find time. Do you already have sample? Click to expand... No, but I have used jShell to run various Linux shell commands, so I am assuming that it will work with "DOS" commands like "attrib" too. I'll look into it when I get a chance. I was just curious to know if there are any advantages/disadvantages of using one technique over the other.
peacemaker Expert Licensed User Longtime User Mar 2, 2023 #5 Thanks. Imho, better to show the real example of Array("attrib +H <path_to_your_file>"), under Win and Linux.
Thanks. Imho, better to show the real example of Array("attrib +H <path_to_your_file>"), under Win and Linux.
aeric Expert Licensed User Longtime User Mar 2, 2023 #6 peacemaker said: Thanks. Imho, better to show the real example of Array("attrib +H <path_to_your_file>"), under Win and Linux. Click to expand... This code snippet is a response to another thread for license software protection. If someone is going to hide a file in a hidden folder such as in username\AppData\Roaming\Microsoft\xxx I take another step further to make the file hidden. You may use any file path you like.
peacemaker said: Thanks. Imho, better to show the real example of Array("attrib +H <path_to_your_file>"), under Win and Linux. Click to expand... This code snippet is a response to another thread for license software protection. If someone is going to hide a file in a hidden folder such as in username\AppData\Roaming\Microsoft\xxx I take another step further to make the file hidden. You may use any file path you like.