I have a simple but annoying issue.

Im trying to create 2 folders both called ".config", one in %allusersprofiles% and one in %userprofile%.
Once the folders exist I need a txt file copied into the folders.
I just cant get my head around this.

2 problems.
1. Using WPS I cant get it to create the folders, using the createfolder table. It lets me put it in the table, but doesnt create the folder. (I could be missing something there).
2. I need a file copied to the folder. But if the msi doesnt create the folder, how do I put the file in there ?

Ive given up and am using a script to do this, but Id rather have used WPS. Thoughts ?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
try this ..

session.targetpath("MYDIR") = "blah"

or

use a set directory CA.
Answered 05/06/2008 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
0
#2
As long as you have a file installed to a directory you do not need to populate the CreateFolder table.

Could you post your entry for the .config folder from the Directory table.
Answered 05/07/2008 by: AngelD
Red Belt

Please log in to comment
0
ORIGINAL: AngelD
#2
As long as you have a file installed to a directory you do not need to populate the CreateFolder table.



There in lye’s the problem, i cant create the folder, unless I use the createfolder table, but that doesn’t work.
And i couldnt use a Set Directory CA for the same reason, windows or WPS dosnt let you create afolder with a dot at the start of the name.
Try and create a folder called ".config" in windows explorer. It will tell you that you must type a file name.

Its all ugly anyway. Because the file and folder had to be in the profiles it was easier jsut to script it.
Answered 05/07/2008 by: reds4eva
Second Degree Blue Belt

Please log in to comment
0
In the Installation Expert view name the directory config, then go to the Setup Editor and change the Directory.DefaultDir column to .config instead.

You will get an ICE03 error "Invalid DefaultDir string; Table: Directory, Column: DefaultDir, Key(s): config" but the directory will be created anyway. So as long as you're find with the ICE error duing validation there should be no problems for the compiled MSI to create the directory and install any file (component) refering to the directory without using the CreateFolder table.
Answered 05/07/2008 by: AngelD
Red Belt

Please log in to comment
1
ORIGINAL: AngelD

In the Installation Expert view name the directory config, then go to the Setup Editor and change the Directory.DefaultDir column to .config instead.

You will get an ICE03 error "Invalid DefaultDir string; Table: Directory, Column: DefaultDir, Key(s): config" but the directory will be created anyway. So as long as you're find with the ICE error duing validation there should be no problems for the compiled MSI to create the directory and install any file (component) refering to the directory without using the CreateFolder table.


A bit too late reply, but to fix the Ice03 in this case you can change the defaultdir value to config|.config as ice03 sees it is a long filename.
Answered 05/19/2008 by: pgiesbergen
Orange Belt

Please log in to comment
0
Nice pgiesbergen!

I tested (sorry, I always need to confirm) and worked great.
Gonna rate you for that one.

/Kim
Answered 05/19/2008 by: AngelD
Red Belt

Please log in to comment
0
ORIGINAL: AngelD
In the Installation Expert view name the directory config, then go to the Setup Editor and change the Directory.DefaultDir column to .config instead.
You will get an ICE03 error "Invalid DefaultDir string; Table: Directory, Column: DefaultDir, Key(s): config" but the directory will be created anyway. So as long as you're find with the ICE error duing validation there should be no problems for the compiled MSI to create the directory and install any file (component) refering to the directory without using the CreateFolder table.



I did do that when I realised I couldnt create the folder the conventional way, and yes it created the folder, but, it would not create the folder in the current user profile, only in All users or c:\windows\profiles. (I think, cant remember now, but it wasnt where I wanted it)

Thanks for all your help.
Answered 05/20/2008 by: reds4eva
Second Degree Blue Belt

Please log in to comment
0
ORIGINAL: reds4eva
...it created the folder, but, it would not create the folder in the current user profile, only in All users or c:\windows\profiles.
WPS sometimes disappears up its own rear when trying to resolve user profile folders. Nowadays, I have a bunch of CAs (shamelessly lifted from an InstallShield package) which explictly set the relevant properties and no longer get files and folders in odd, unexpected places. Search the archive for posts by me with 'SetAllUsersProfileNT' as the keyword for details.
Answered 05/21/2008 by: VBScab
Red Belt

Please log in to comment
0
Yip, I'd already borrowed your CA's :)
(after a search, take note packagers from New Delhi, search is your friend)
But i still couldnt get it to work, unfortuanately it was a rush job, I may revisit it at a later date to resolve that, just so i know the answer.
Answered 05/21/2008 by: reds4eva
Second Degree Blue Belt

Please log in to comment
Answer this question or Comment on this question for clarity