Create folder with "."
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 ?
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
Answers (9)
Please log in to answer
Posted by:
pgiesbergen
16 years ago
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.
Posted by:
jmcfadyen
16 years ago
Posted by:
AngelD
16 years ago
Posted by:
reds4eva
16 years ago
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.
Posted by:
AngelD
16 years ago
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.
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.
Posted by:
AngelD
16 years ago
Posted by:
reds4eva
16 years ago
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.
Posted by:
anonymous_9363
16 years ago
ORIGINAL: reds4evaWPS 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.
...it created the folder, but, it would not create the folder in the current user profile, only in All users or c:\windows\profiles.
Posted by:
reds4eva
16 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.