/build/static/layout/Breadcrumb_cap_w.png

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 ?

0 Comments   [ + ] Show comments

Answers (9)

Posted by: pgiesbergen 15 years ago
Orange Belt
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.
Posted by: jmcfadyen 15 years ago
5th Degree Black Belt
0
try this ..

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

or

use a set directory CA.
Posted by: AngelD 15 years ago
Red Belt
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.
Posted by: reds4eva 15 years ago
Second Degree Blue Belt
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.
Posted by: AngelD 15 years ago
Red Belt
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.
Posted by: AngelD 15 years ago
Red Belt
0
Nice pgiesbergen!

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

/Kim
Posted by: reds4eva 15 years ago
Second Degree Blue Belt
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.
Posted by: anonymous_9363 15 years ago
Red Belt
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.
Posted by: reds4eva 15 years ago
Second Degree Blue Belt
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.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ