naming subdirectory in cab project

D

doolaard

Hello,

I need to deploy a settings file in a subdir of the special directory
My Documents. I want the name of that subdir to be the name of the
application. How can I do that?

For example. The name of the application is TestSettings.exe and the
name of the file is test.xml. I want test.xml have a path of My
Documents/TestSettings/test.xml

I know I can create the subdir in the deployment project and give it a
name by hand. However I want to do it dynamically, based on the
applicationname.

Thanks in advance,

Jan
 
G

Guest

You can install the xml file to your app directory and then on initial start
of the application, create the new directory and move your xml file to that
location.

Regards,
Rick D.
Contractor
 
B

Bill Stelzel

When you create the subdir in the deployment project give it the name
"%AppName" (without the quotes). Upon installation this will be replaced
with your application name. If you look in the generated .inf file you
should see something like....

[DestinationDirs]
Shortcuts=0,%CE2%\Start Menu
Files.Common1=0,"%CE5%\%AppName%"
Files.Common2=0,"%InstallDir%"

[Files.Common1]
"XMLFile1.xml","XMLFile1.xml",,0

[Files.Common2]
"DeviceApplication3.exe","DeviceApplication3.exe",,0

The device installer handles expanding the %xxx% variables upon
installation.

Hope you find this useful,
Bill
 
B

Bill Stelzel

I meant "%AppName%" as the name of the subdir in the deployment project -- I
must learn to proofread before hitting send :(


Bill Stelzel said:
When you create the subdir in the deployment project give it the name
"%AppName" (without the quotes). Upon installation this will be replaced
with your application name. If you look in the generated .inf file you
should see something like....

[DestinationDirs]
Shortcuts=0,%CE2%\Start Menu
Files.Common1=0,"%CE5%\%AppName%"
Files.Common2=0,"%InstallDir%"

[Files.Common1]
"XMLFile1.xml","XMLFile1.xml",,0

[Files.Common2]
"DeviceApplication3.exe","DeviceApplication3.exe",,0

The device installer handles expanding the %xxx% variables upon
installation.

Hope you find this useful,
Bill


Hello,

I need to deploy a settings file in a subdir of the special directory
My Documents. I want the name of that subdir to be the name of the
application. How can I do that?

For example. The name of the application is TestSettings.exe and the
name of the file is test.xml. I want test.xml have a path of My
Documents/TestSettings/test.xml

I know I can create the subdir in the deployment project and give it a
name by hand. However I want to do it dynamically, based on the
applicationname.

Thanks in advance,

Jan
 
D

doolaard

I meant "%AppName%" as the name of the subdir in the deployment project -- I
must learn to proofread before hitting send :(




When you create the subdir in the deployment project give it the name
"%AppName" (without the quotes). Upon installation this will be replaced
with your application name. If you look in the generated .inf file you
should see something like....
[DestinationDirs]
Shortcuts=0,%CE2%\Start Menu
Files.Common1=0,"%CE5%\%AppName%"
Files.Common2=0,"%InstallDir%"
[Files.Common1]
"XMLFile1.xml","XMLFile1.xml",,0
[Files.Common2]
"DeviceApplication3.exe","DeviceApplication3.exe",,0

The device installer handles expanding the %xxx% variables upon
installation.
Hope you find this useful,
Bill

- Show quoted text -

Hi, Bill

Thanks for this tip, it works. the only thing one has to take into
account is that the ProductName property in the cab-project must be
the samne as in the 'orignal' application. the default is the name of
the cab-project.

Again, thanks

Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top