Search code examples
winformssql-agent-job

Where did setup install my WinForm application?


I recently developed an WinForm application that I wanted to run on my local SQL server using SQL Agent. I published the WinForm app via Visual Studio and copied the files (three listed below) over to my SQL Server where I ran the setup.exe program.

Application Files (directory)
MyApplicationName.application
setup.exe

My application installed and started up automatically.

Now that I have to schedule the job with SQL Server Agent I cannot find where the application was installed to on the filesystem. I can see the shortcut on the Start menu but it just points to a shortcut. The shortcut does not seem to have any indication as to where the actual application file exists.

I tried to point to the shortcut as the application SQL Agent should start but all I get is "junk text" in the path.

SQL Agent - Run Job


Solution

  • Visual Studio uses ClickOnce deployment to publish WinForms applications. The installation folder varies by Windows version. For example on Windows XP it is

    C:\Documents and Settings\USERNAME\LocalSettings\Apps\2.0\

    and on Vista and above it is

    C:\users\USERNAME\AppData\Local\Apps\2.0\