Sub Button1_Click
' Dim AppTitle As String = "PhotoGallery"
Dim jo As JavaObject
jo.InitializeStatic("java.lang.Runtime")
' jo.RunMethodJO("getRuntime", Null).RunMethod("exec", Array("attrib +H <"&File.DirData(AppTitle)&"\hiden.txt>")) '----> did not work
jo.RunMethodJO("getRuntime", Null).RunMethod("exec", Array("attrib +H "&File.DirApp&"\hiden.txt")) '----> did not work
xui.MsgboxAsync("OK", "B4X")
End Sub
Sub Button2_Click
Private shl As Shell
Private params As List
params.Initialize
params.Add("attrib +H")
' params.Add("C:\Users\H\Downloads\JSHLL\Objects\hiden.txt") '----> did not work
' params.Add(File.DirApp&"\hiden.txt") '----> did not work
params.Add(File.Combine(File.DirApp,"\hiden.txt")) '----> did not work
shl.Initialize("shl","cmd.exe",params)
shl.WorkingDirectory = "C:\Windows\system32"
' shl.WorkingDirectory = File.DirApp '----> did not work
shl.Run(1000)
Wait For shl_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
If Success And ExitCode = 0 Then
xui.MsgboxAsync("OK", "B4X")
Else
xui.MsgboxAsync(StdErr, "Error:")
End If
End Sub