Auto run program after installation using .net2.0 RRS feed

  • Question


    Q: How do I automatically run my program after installation?
    A: There is a way that might work, but it also might not work the way you expect.

    1. Create a .vbs file with the following code.
    Dim WshShell
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run """" & Property("CustomActionData") & """",7,False
    Set WshShell = Nothing
    2. Open your setup project and go to the Custom Actions Editor
    3. Select the Commit Node and right-click, add a new Custom Action
    4. Browse the filesystem to add the .vbs file from step 1
    5. Edit the CustomActionData property and add the following:
    6. Change “YourApp.exe” to whatever your startup app file name is.
    Above script works fine with WinXP when included with setup project as described above, but with Vista shows error msg "Property not recognized".
    Note: SetUp is created for Window based application.
    Friday, January 16, 2009 11:31 AM


All replies

  • Hi!

    You should try this:

    Lucian Baciu,
    • Marked as answer by Figo Fei Monday, January 19, 2009 4:10 AM
    Friday, January 16, 2009 3:44 PM
  • Thanks for solution now it works fine.

    Now while installation it shows a button "Disk Cost" under Select Installation Folder dialog.

    Now I wants to show Disk Cost detail of selected drive only that is mention in Browse location like if my installation location is C: drive then Disk Cost must show only C: disk cost details not of anyelse.
    Monday, January 19, 2009 9:54 AM
  • How to provide publisher information with setup project so it shuldn't show the error message as "Unknown Publisher" while installing application, with Vista it shows this error message.
    Monday, January 19, 2009 9:56 AM