none
Problem Changing Default Install Folder for MSI

    Question

  • Hi,

    I am building an MSI file with VS 2005. When I run the built MSI and leave the Default directory unchanged, the application installs fine and all is well.

    However, if I change the default directory, I get the following error:

    "A portion of the folder path " is invalid. It is either empty or exceeds the length allowed by the system.

    If I click OK on this error and hit the "Next" button anyway, the app installs but it puts all the folders in the default directory, and 2 files in the directory I entered.

    When I turn on logging and repeat the process, this is some of what happens.

    MSI (c) (F0:04) [13:52:25:823]: Doing action: DIRCA_TARGETDIR
    Action 13:52:25: DIRCA_TARGETDIR.
    Action start 13:52:25: DIRCA_TARGETDIR.
    MSI (c) (F0:04) [13:52:25:823]: PROPERTY CHANGE: Adding TARGETDIR property. Its value is 'C:\ISAWIN'.
    Action ended 13:52:25: DIRCA_TARGETDIR. Return value 1.
    .
    .
    .
    MSI (c) (F0:04) [13:52:25:870]: PROPERTY CHANGE: Modifying TARGETDIR property. Its current value is 'C:\ISAWIN'. Its new value: 'C:\ISAWIN\'.
    MSI (c) (F0:04) [13:52:25:870]: PROPERTY CHANGE: Modifying NEWRETARGETABLEPROPERTY1.B6FAF9EDEC004690AC43701F5DA30CE1 property. Its current value is 'C:\ISAWIN\EXE'. Its new value: 'C:\ISAWIN\EXE\'.
    MSI (c) (F0:04) [13:52:25:870]: PROPERTY CHANGE: Adding _EFE3537C5CBE4F54928DA108F940E0FF property. Its value is 'C:\ISAWIN\Icons\'.
    MSI (c) (F0:04) [13:52:25:870]: PROPERTY CHANGE: Adding _AF86640248484B87A137230B1F02DBD6 property. Its value is 'C:\ISAWIN\TMP\'.
    MSI (c) (F0:04) [13:52:25:870]: PROPERTY CHANGE: Adding _6CC65538AD6745FF92E635E754C65BA4 property. Its value is 'C:\ISAWIN\TMP\RELS\'.
    MSI (c) (F0:04) [13:52:25:870]: PROPERTY CHANGE: Adding _A5AD96CEA451459690A94479D2256357 property. Its value is 'C:\ISAWIN\TMP\DATA\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _6F29FF6469644290B0454E86A9DA79D9 property. Its value is 'C:\ISAWIN\TMP\OBJS\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _88F12BEDB7654CFBB01E52B4BC7BAC6E property. Its value is 'C:\ISAWIN\ARK\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _CCF61E2007484C108D00A2BDA9CC5997 property. Its value is 'C:\Documents and Settings\All Users\Start Menu\Programs\targetProgram \'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _71C8AA9F5E1441EDA56F2C5C6C68EBB7 property. Its value is 'C:\ISAWIN\APL\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _B112BCBB16E14449B1FF72C4F02EDF18 property. Its value is 'C:\ISAWIN\APL\CREATION\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _FA99A00B1E8640E8BA0F6A2ECAEEB62D property. Its value is 'C:\ISAWIN\COM\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _DDED982205D749B2BAF1BDEA5F0C7A32 property. Its value is 'C:\ISAWIN\Install\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _EF93599DB8BB4540BF6FAE0520CBDFC3 property. Its value is 'C:\ISAWIN\SMP\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _DB23E2B8190940B9BFCE96C5C4AF527F property. Its value is 'C:\ISAWIN\SMP\DIAL_SFC\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _0E74C1334C404AA5B3BD7D1F33804FE4 property. Its value is 'C:\ISAWIN\SMP\MSTR_SFC\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _AE95533AE782411082278D37C78D4D9C property. Its value is 'C:\ISAWIN\EXE\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _D532E5CDA1764A5EA841F45AD426A508 property. Its value is 'C:\ISAWIN\LIB\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _2941A30F5FF544E28B03A6477567A728 property. Its value is 'C:\ISAWIN\LIB\DEV\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _69AD1F69F602402C84DF46A6CF0E1E29 property. Its value is 'C:\ISAWIN\LIB\CFBL\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _74182E08C21947089D2D2616D6D22EEC property. Its value is 'C:\ISAWIN\LIB\DEFS\'.
    MSI (c) (F0:04) [13:52:25:885]: PROPERTY CHANGE: Adding _BD8ACDA8D11C4A46AF78E179DB87D6E0 property. Its value is 'C:\ISAWIN\LIB\CUSP\'.
    MSI (c) (F0:04) [13:52:25:901]: PROPERTY CHANGE: Adding _C58FD1CD8DA0495BA5743C192E30D27E property. Its value is 'C:\ISAWIN\LIB\RELS\'.
    MSI (c) (F0:04) [13:52:25:901]: PROPERTY CHANGE: Adding _374FD828B98248F98FBE86C9A443DF72 property. Its value is 'C:\ISAWIN\LIB\CCNV\'.
    MSI (c) (F0:04) [13:52:25:901]: PROPERTY CHANGE: Adding _DED3B0C253E34E3C8B106533426107AC property. Its value is 'C:\ISAWIN\LIB\IOC\'.
    MSI (c) (F0:04) [13:52:25:901]: PROPERTY CHANGE: Adding _2E0A95923045489DA889805164728A35 property. Its value is 'C:\ISAWIN\LIB\SRC\'.
    MSI (c) (F0:04) [13:52:25:901]: PROPERTY CHANGE: Adding _645F809D1BFB4B029813B21001CD6C9E property. Its value is 'C:\ISAWIN\LIB\FNC\'.
    MSI (c) (F0:04) [13:52:25:901]: PROPERTY CHANGE: Adding _415A3BF29B364CF1A18F463E8B0E3990 property. Its value is 'C:\ISAWIN\LIB\FBL\'.
    MSI (c) (F0:04) [13:52:25:901]: PROPERTY CHANGE: Adding _F4A1A4FBD417451B9925780423F1E0E9 property. Its value is 'C:\ISAWIN\LIB\SFC\'.
    MSI (c) (F0:04) [13:52:25:901]: PROPERTY CHANGE: Adding _3FA75334FE894B4E92260BC18A3CA9D7 property. Its value is 'C:\ISAWIN\LIB\Source\'.
    .
    .
    .BY THIS POINT IT SEEMS THE DAMAGE IS DONE
    MSI (c) (F0:98) [13:52:34:949]: PROPERTY CHANGE: Modifying TARGETDIR property. Its current value is 'C:\ISAWIN\'. Its new value: 'C:\ENTERED_DIR \'.
    MSI (c) (F0:98) [13:52:35:058]: Note: 1: 2335 2: C:\ISAWIN\ 3: C:\WINDOWS\
    MSI (c) (F0:98) [13:52:35:058]: Note: 1: 2335 2: C:\ISAWIN\ 3: C:\Program Files\Common Files\
    MSI (c) (F0:98) [13:52:35:058]: Note: 1: 1322 2: 
    MSI (c) (F0:98) [13:52:35:058]: Note: 1: 2262 2: Error 3: -2147287038
    MSI (c) (F0:98) [13:52:35:074]: Note: 1: 2262 2: Error 3: -2147287038
    DEBUG: Error 2835:  The control ErrorIcon was not found on dialog ErrorDialog
    The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog,
    Error 1322. A portion of the folder path '' is invalid.  It is either empty or exceeds the length allowed by the system.
    MSI (c) (F0:98) [13:53:43:092]: Note: 1: 2262 2: Error 3: -2147287038
    MSI (c) (F0:98) [13:53:43:092]: Product: Prod-- Error 1322. A portion of the folder path '' is invalid.  It is either empty or exceeds the length allowed by the system.



    If, I start the msi from the command line and force TARGETPATH to a certain path, everything goes smoothly.

    Thank you for any help you can provide
    Monday, March 1, 2010 7:04 PM

All replies

  • You'll have to describe what you're doing and where ENTERED_DIR comes from.
    Phil Wilson
    Wednesday, March 3, 2010 12:11 AM
    Moderator
  • Hi CMAndrei,

     

    How is the issue now?

    If this has been solved, it would be appreciated if you share the solution here so that the answer can be found and used by other community members having the similar questions.

     

    If it has not been solved, could you please provide us more information about this issue?

     

    Best regards,

    Ling Wang


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, March 8, 2010 10:04 AM
    Moderator
  • Hi,

     Which property in the deployment proj have you modified to let it install in your customfolder? Well when i did the same, i modified "DefaultLocation" property of the Application Folder in the deployment project.
    Monday, March 15, 2010 6:53 AM