PC Review


Reply
Thread Tools Rate Thread

naming subdirectory in cab project

 
 
doolaard@gmail.com
Guest
Posts: n/a
 
      7th Nov 2007
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

 
Reply With Quote
 
 
 
 
=?Utf-8?B?ZGJncmljaw==?=
Guest
Posts: n/a
 
      7th Nov 2007
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

"(E-Mail Removed)" wrote:

> 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
>
>

 
Reply With Quote
 
Bill Stelzel
Guest
Posts: n/a
 
      8th Nov 2007
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


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>

 
Reply With Quote
 
Bill Stelzel
Guest
Posts: n/a
 
      8th Nov 2007
I meant "%AppName%" as the name of the subdir in the deployment project -- I
must learn to proofread before hitting send


"Bill Stelzel" <(E-Mail Removed)> wrote in message
news:A790B7B9-AB29-465A-A1D2-(E-Mail Removed)...
> 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
>
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

 
Reply With Quote
 
doolaard@gmail.com
Guest
Posts: n/a
 
      8th Nov 2007
On Nov 8, 7:06 am, "Bill Stelzel" <bstel...@hotmail.com> wrote:
> I meant "%AppName%" as the name of the subdir in the deployment project -- I
> must learn to proofread before hitting send
>
> "Bill Stelzel" <bstel...@hotmail.com> wrote in message
>
> news:A790B7B9-AB29-465A-A1D2-(E-Mail Removed)...
>
>
>
> > 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

>
> > <doola...@gmail.com> wrote in message
> >news:(E-Mail Removed)...
> >> 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- Hide quoted text -

>
> - 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy subdirectory structure WITHOUT copying subdirectory contents =?Utf-8?B?Y2hhbXA=?= Windows XP Basics 1 21st Apr 2006 09:53 PM
Strong naming assembly in an vb aspx project job@bla.com Microsoft ASP .NET 2 14th Mar 2006 04:37 PM
Naming a Setup Project Bry Microsoft C# .NET 1 2nd Mar 2006 05:06 PM
Strong Naming an ASP.Net Project Manuel Lopez Microsoft ASP .NET 6 2nd Dec 2003 10:12 PM
Naming cells for a project Brenda Microsoft Excel Worksheet Functions 1 26th Nov 2003 12:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:20 AM.