|
I think this is the correct thread... Total newbie at VB. Anyway, I'm creating a GUI in order to launch a batch file which then kicks off a PowerShell script. The GUI compiles fine and everything works great, however when I go to deploy the file it doesn't actually include any of the supporting files like the batch scrips or PowerShell scripts and their directories. Stupid question but... how do I make sure these are included with the project when a user goes to install it? Using Visual Studio Express 2013. Edit- Does it make it more complicated if there are directories that the PS script replies on in order to write out logs to? All my real coding is in the scripts. The form is just a user-friendly GUI. TheEffect fucked around with this message at 20:48 on Jul 23, 2014 |
# ¿ Jul 23, 2014 20:38 |
|
|
# ¿ May 2, 2024 08:36 |
|
Mr Shiny Pants posted:You should create the folders within VS solution and tell it to copy the solution files "always". The copy option is within the file properties of the file you want it to copy. I see. Do I need to create the empty directories (that get populated at run-time) myself? It seems I can't add an entire directory at once. When it's installed I'm guessing these files/directories will go into the "Publishing Folder Location"(is there something better to use than "C:\Program Files (x86)\" here?), correct? Edit- Hmm, nope. That doesn't appear to work. I don't see that the files are being copied over to the installation directory. The buttons on my form use direct paths to the scripts to launch them so I'm not sure if that makes any difference with how I need to go about this. TheEffect fucked around with this message at 21:22 on Jul 23, 2014 |
# ¿ Jul 23, 2014 21:00 |
|
GrumpyDoctor posted:How are you deploying? I'm just trying to make it as easy as possible to deploy this to other users who are not very PC savvy. I'm clicking "Build" -> "Publish [project]". I don't need an installer per-say. The one-click install process that this is creating is fine for my purposes; I'm just not sure how to get the files that the form relies on to copy over to the installation directory when it does get installed. Edit- I think I found it. I had to set "Build Action" to "Content" on my files (why can't I do this per directory?). Still testing... Editx2- The copies are being copied over just fine now, but not the empty directories. When I try to add the empty directory to my solution it tells me the folder already exists, but it's not in my solution explorer? TheEffect fucked around with this message at 22:24 on Jul 23, 2014 |
# ¿ Jul 23, 2014 21:26 |
|
Che Delilas posted:Edit: Okay, reading back I see that the scripts need these folders, not your application. In that case your application should probably check for the folders on startup instead of every access. Or if you have access to the underlying script, make the script do it (why isn't the script doing it). You're right. I'll add some logic in the script to check for the folders I need and create them if needed. I didn't design the script with a GUI in mind. Once my boss saw it he wanted it to be implemented globally in an easy manner, so I brushed off my intro to VB book and started going at it in a backwards way, hence why I'm finding it so difficult and trying to find work-arounds to get this thing going like I want it to. Thanks for the help everyone!
|
# ¿ Jul 23, 2014 22:47 |
|
Can I use a wildcard to search for directories that start with a certain string? Pseudo-code example- If *DirExists*("C:\Program Files\ABC" & *Wildcard here* & ".txt") Then *Do something*
|
# ¿ Jan 13, 2015 16:37 |
|
Excellent, thank you!
|
# ¿ Jan 13, 2015 16:56 |
|
I was just wondering if the following was possible with VB.Net- I want to make an application that automatically names a group chat via Lync. Currently the way we do it (because we don't use Lync's persistent chat feature) is create a word document with the title of the Lync chat we want, open it open and click "Share" and then share by IM. Then you add people and when you start the conversation the title of the document is the title of the conference. I know PS can obtain quite a bit of Lync data and do all sorts of things with it but I need this to be useable by employees who have limited rights, so assigning execution policy as unsigned wouldn't be possible for them to do, thus PS is out of the question... but can this be accomplished with VB.Net?
|
# ¿ Feb 17, 2015 17:22 |
|
chippy posted:I'm afraid I don't know the answer to your specific question but this looks to be a good starting point: Sorry, should've specified this was Lync 2013, but I looked around for that documentation and think I found the 2013 versions of the articles you linked, so thank you! I should really utilize MSDN more often.
|
# ¿ Feb 17, 2015 18:11 |
|
EssOEss posted:Why don't you just sign your scripts so everyone can run them, if you think it can be done via PowerShell? Because I don't control the certificate server for my org unfortunately.
|
# ¿ Feb 17, 2015 19:18 |
|
I'm trying to rewrite a program that I wrote in PowerShell that copies files and folders over a network to a selected list of PCs. I've come across a snag though... I'm using "directoryBrowse.ShowDialog()" for users to select a directory... but it obviously doesn't let them select individual files. Is there anything I can use that will allow my users to select either a file OR a folder to copy?
|
# ¿ Mar 19, 2015 03:19 |
|
crashdome posted:Oh man, I remembered this from way back and I had to google a little but, I think I found the solution. I simply remembered that it was configurable options of the OpenFileDialog control and this person seems to have documented them: You're my savior man. Thanks!
|
# ¿ Mar 19, 2015 04:19 |
|
Can I use File.Copy to copy directories, or should I be looking at something else? I noticed it says the destination source can't be a directory, but I can work past that, Maybe a better way to ask this is- my application lets users select either files or directories and the plan is to then copy said selected files/directories to user-specified locations. Is File.Copy what I should be using? TheEffect fucked around with this message at 23:58 on Mar 19, 2015 |
# ¿ Mar 19, 2015 23:55 |
|
The FileSystem method is exactly what I needed. Thank you sir!
|
# ¿ Mar 20, 2015 03:31 |
|
I'm trying to create a tray icon for my little home brewed application. Based on the code I have below, can anyone help me with the following- 1) The icon will stay after the program has quit until you hover over it. This can create multiple "ghost" icons. How do I prevent this? 2) A lot of the time click on the menu item, even though its clearly highlighted, won't do anything at all. What's the deal with that? 3) Each time the context menu opens up a taskbar icon is opened as well. How do I stop this?!?! 4) I have code that closes the context window after the mouse hovers away from it, but I'd rather it be so the user has to click to make it close. I can't find any examples that have worked for me thus far. Here's the code- code:
TheEffect fucked around with this message at 07:43 on Mar 23, 2015 |
# ¿ Mar 23, 2015 07:41 |
|
Newbie question here, but how come this won't work for me?code:
I've been reading up on the solution/ links posted here but can't seem to get it to work no matter what I do. tunah posted:Remember to call Dispose on the icon when your application is exiting. Actually, I'm already calling it before the exit button is clicked. Should it be elsewhere? code:
VVV That looks amazing! VVV TheEffect fucked around with this message at 16:38 on Mar 25, 2015 |
# ¿ Mar 25, 2015 16:31 |
|
GrumpyDoctor posted:& is a string concatenation operator in VB.NET. Did you mean to use AndAlso? I have no formal VB.Net training, only C++ and very little at that. That was exactly what was needed. Thank you!!!
|
# ¿ Mar 25, 2015 16:40 |
|
I'm kind of a "try it and break it until you figure it out" kind of guy. So far I'm almost nearly done with writing a fairly impressive, in my opinion, file push / file remove program that let's user's choose a file or a directory to push/remove and let's them specify where it should go, without any training in vb.net at all. I guess that's elementary for most of you guys but I'm kind of proud of myself. Although to be fair I should've Google'd around a bit more on that last question since the answer was so very simple, and an intro tutorial probably WOULD'VE covered something like that. Edit- So on that note, for a slightly more advanced question, how come "My.Computer.FileSystem.CopyDirectory" doesn't copy the directory that's selected like MSDN implies, but rather the CONTENTS of said directory? How can I get around this? TheEffect fucked around with this message at 00:49 on Mar 26, 2015 |
# ¿ Mar 25, 2015 17:00 |
|
So CopyDirectory doesn't do much really, like copying permissions over and things like that. I've found ways around most of these problems thanks to you guys but is there any way to copy the source folder's icon over? Or rather, whatever attribute handles the location of which icon to use for the directory?
|
# ¿ Apr 2, 2015 00:14 |
|
chmods please posted:I believe that's handled with desktop.ini inside the directory. I think it's hidden and possibly even system by default. Hmm. Here's what's in my Desktop.ini- code:
How come I can push files that retain the chosen icon but not directories?
|
# ¿ Apr 2, 2015 15:27 |
|
Am I overlooking something or is there not an easy way to put a click-able e-mail address in an RTF text box? Here's a bunch of pieced-together code that I found online when researching the issue. I had to convert most of it to VB from C# and then tweak it along the way. When I run my program I eventually get an out of memory exception at "thread.Start(threadData)".code:
code:
Edit- Was following the advice located here- http://stackoverflow.com/questions/28864778/sending-email-as-html-from-richtext-box TheEffect fucked around with this message at 23:56 on Apr 11, 2015 |
# ¿ Apr 11, 2015 23:48 |
|
|
# ¿ May 2, 2024 08:36 |
|
ljw1004 posted:That said, I don't know what that code is doing nor why. Whenever I wanted a hyperlink in win32, I made basically just made it a TextBlock, set font to blue underline, set its cursor to a Hand, and added a Click hander. I like this much better. Thanks@
|
# ¿ Apr 12, 2015 07:20 |