![]() |
|
|||||||
| Deployment Discussions related to installation, patching/updates, no touch deployment, etc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
hello everybody!
i have a problem. What i want is that i can include a file (a bat or something) and that i can say in my code Shell("clean.bat") without that file being in the same folder as my exe. How do i do that?
|
|
|||
|
what i want is to embed the file in my exe and that i can execute my .bat with shell("clean.bat") anybody know? nvm, did it otherwise
Last edited by bobbel; 11-04-2008 at 4:27 PM. |
|
|||
|
well, what i did: when you press a button, it print a bat file that ends with "del clean.bat" and then executes it, so you can't read it and you nearly can't copy it
|
|
|||
|
Sorry if my guess is wrong. Judging by the name of your bat file. If you are deleting all files in a folder then you can use this.
Code:
For Each foundFolder As String In My.Computer.FileSystem.GetDirectories("C:\Test")
My.Computer.FileSystem.DeleteDirectory(foundFolder, FileIO.DeleteDirectoryOption.DeleteAllContents)
Next
For Each foundFile As String In My.Computer.FileSystem.GetFiles( "C:\Test", FileIO.SearchOption.SearchAllSubDirectories, "*.*")
My.Computer.FileSystem.DeleteFile(foundFile, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.DeletePermanently)
Next
Last edited by shawnplr; 11-08-2008 at 7:06 PM. |
|
|||
|
Quote:
If you really want a batch file... and it must be part of the exe.. My work around would be to create a sub routine which actually creates a new batch file and writes the content to it. Then run the file and after the execution has completed, delete it. |
|
|||
|
Yes Leon he did just that.
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|