dcsimg
Results 1 to 7 of 7

Thread: Changing the path installation after publish

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2011
    Posts
    35

    Changing the path installation after publish

    Hi

    I would like to ask about publish project in Vb.I am using OneTouch in Vb
    After I have publish the project, all information (database, images, other files ) will be put in this C:\Documents and Settings\newuser\Local Settings\Apps\2.0

    1. Is there any other way I change this to make it simpler? I mean not in a longer path where I can create a specific folder on the location that it suppose to be put? For example everything will be put in desktop?

    2. I just wondering after I have run the set up to install the program in computer, I have to add manually (.txt file, a folder(to store image), icon .ico etc). Why this items not directly installed after it's being published?



    Thank you so much

    zafi

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,589

    Re: Changing the path installation after publish

    Quote Originally Posted by nonie1 View Post
    I am using OneTouch in Vb
    It's called "ClickOnce".
    Quote Originally Posted by nonie1 View Post
    1. Is there any other way I change this to make it simpler? I mean not in a longer path where I can create a specific folder on the location that it suppose to be put? For example everything will be put in desktop?
    No. ClickOnce apps are installed to the ClickOnce cache.
    Quote Originally Posted by nonie1 View Post
    2. I just wondering after I have run the set up to install the program in computer, I have to add manually (.txt file, a folder(to store image), icon .ico etc). Why this items not directly installed after it's being published?
    You can install any files you like with the app. That's what the project properties are for, specifically the Publish tab. You'd probably do better to add those files as resources though. In that case they are compiled into the EXE file and access them in code via My.Resources.

  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2011
    Posts
    35

    Re: Changing the path installation after publish

    Hi Jmcilhinney,

    Can you please explain a lit bit further on my 2nd question?
    What do you mean via my.resources?

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,589

    Re: Changing the path installation after publish

    Always look first and ask questions later.

    http://www.bing.com/search?FORM=WLET...sources+vb.net

  5. #5

    Thread Starter
    Member
    Join Date
    Feb 2011
    Posts
    35

    Re: Changing the path installation after publish

    hi jmcilhinney

    Yes I admit that I don't know much about vb but I still would like to learn. I don't have knowledge on basic programming at all and that is why You can see me keep asking questions. I just learn this less than 3 weeks. Anyway I appreciate your advise. I just need a little explanation on the usage of my resources.

    I have gone through the article based on your link and found a very good one.
    Now I am not sure how to do this. After I put images in resources How can I use it? I mean to call it. I try to put my.resources.image1.jpeg for instance but it's wrong.

    Another thing, How to embedded together a folder before I can publish a project?

    This codes contains folder sc1.
    sc.CaptureScreen.Save("sc1/" & imagename & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)

    Please correct me if i'm wrong. I am willing to learn.

    Thank you so much

  6. #6
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,589

    Re: Changing the path installation after publish

    You can't just makeup members. If you have added a file named "image1.jpeg" to the Resources page of your project properties then you will see on the page an item named "image1". When you tpye in the code editor "My.Resources." it would show you that there is a property named "image1". It's not a file anymore. It's a resource; part of the binary code of the compiled EXE. Intellisense would have shown you "image1" as you typed and it would have told you that it was type Image, but it would not have shown you "jpeg". Always take notice of what the IDE is telling you and don't add things that it doesn't say exist.

  7. #7

    Thread Starter
    Member
    Join Date
    Feb 2011
    Posts
    35

    Re: Changing the path installation after publish

    Hi jmcilhinney,

    This is what I am facing now

    Please refer here for (Problem.bmp) http://cid-77fe20fabddbcb9e.photos.live.com/self.aspx/Capture%20screen/problem.bmp

    In problem.bmp, It's showing the hierarchical list of form, zafi.iso, consent.txt, logo.gif and sc1 folder(it's likely transparent)

    I have set up consent.txt, zafi.iso and logo.gif as you see in solution explorer = Set the build action to "content" and set "copy to output directory" to "copy always" for each one However, I am facing problem because all these will be embedded in a folder /bin/debug instead of a single file for each. After installation, I try run my program error occurs as the program cannot find the consent.txt (I reckon here it's located in a separate folder) Please refer here http://cid-77fe20fabddbcb9e.photos.l...roblem%202.bmp(problem2.bmp). If I copy the file and put it outside of bin folder as depicted then It works fine. So I would like to eliminate this manually job. Having said that, I would like to make it automatically installation to the specific path. I don;t know how to do it and if you could help me on this.

    (In problem2.bmp picture, I would like to ensure all content in bin folder will be move out (No need to create bin folder instead just the file as mentioned).I know in my solution explorer these items were listed under bin/debug. Just wondering how to make it as single item without putting in the folder?) In my application files list its shows bin\debug\zafi.ico. (folder bin sub folder debug and file name) Can i just set the file name without bin and debug folder/sub folder?

    3. Another thing as you can see from problem.bmp, there is a folder sc1 (but look like transparent instead of yellow color folder). I would like to embed this folder as well But after installation, no folder is being created. I have to put it manually instead. I reckon the folder properties does not contains build action and copy to output directory field as well . How would I insert the folder for my setup installation? so that it will appear directly after installation without putting it manually?

    I hope to hearing from you soon.
    Last edited by nonie1; Feb 23rd, 2011 at 08:29 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width