Where is .exe file placed in visual studio 2008 applications after publishing?

Hi all,

I have just finished writing a visual basic application (console app) and I want this to run on a different machine.

I went through publishing process (menu Build -> Publish application_name) which resulted in creating a folder in my desktop (for some reason when I try to publish the application in a folder in my program files it fails). Then, I clicked setup in the new folder and my application was installed in the target machine (I can start it through star menu and also uninstall it from windows programs).

However, I want this program to start automatically using task scheduler. On my developing machine I do this by targeting the .exe file in the folder  .../project_name/obj/Release/project_name.exe.

My question is where the .exe file is located after the installation to the new machine?

Is it possible the application to be installed in program files (c:\program files\app_name) directly? And also to have some custom folders (for data storing) in the installation folder pre-installed?

Thank you in advance.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Look under your project folder\projectname folder\bin\release\  I am assuming you published it configured for release, right?
If you didn't change it from debug to release before publishing it would be under:
project folder\projectname folder\bin\debug\

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
th_oikonomouAuthor Commented:
My problem is I cannot find these folders after publishing. For example if I publish it in folder Test, then it contains: a folder called "application files", an application manifest with my project's name and a setup file. The "application files" folder does not contain any bin folder and when I click setup I cannot understand where does the program install.
Look under  your application folders not your publish folders. Where do you save your project files? When you build it, before publishing it it creates the exe. Don't worry about published files.
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

th_oikonomouAuthor Commented:
Ok, this is clear. I can find bin folder under my application folders and that is how I solved my problem until now. But my question is when I want to install the application I created to an other PC where is this folder?
When published there is no .exe. It becomes .application. Look for the programname.application that is your .exe.
th_oikonomouAuthor Commented:
that's what seems to happen, but here comes another problem, when I target the application_name.application file with task scheduler it says error not a valid win32 application. With .exe there was no problem at all. Any idea what might goes wrong?
Have you registered it. Try using regsvr32 / i <application.dll>
I have some scheduled tasks that use the .application. You are targeting the application, correct? Not any of the versions.
Try running it by double-clicking on it first and see if you get any messages that point you to the problem. I doubt the problem is task scheduler (unless your OS is old).
th_oikonomouAuthor Commented:
sorry for the delay,

I tried double click the application and everything works great. the problem is only when I target the file with task scheduler. (I use windows 7 professional)

can you explain what do you mean by saying to use regsvr32?

in application files folder there are the following files:


and also one file <appname> with "clickonce application deployment manifest" type
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.