Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / April 2005

Tip: Looking for answers? Try searching our database.

Create a folder off the C:\

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
StevenBarnes - 30 Mar 2005 18:33 GMT
The app we are developing uses an older COM component that apparently
does not recognize long directory names. So, when we created our Setup
project and put the needed files in the TARGETDIR\ourSubFolder, we got
runtime errors due to the path being "C:\Program Files\Our Client
Name\AppName\ourSubFolder". The spaces were causing a problem.

Fine, we thought we'd just create a folder with default location  of
C:\ourSubFolder & use it. That works, but if for some reason the app
gets installed on a machine without a C:\ (D: is root for whatever
reason), the install will fail.

Is there a property that we can use to pick up the drive letter of the
installed app, & piece it together with ourSubFolder name? Something
like:  [ROOTDIR]\ourSubFolder  ?

I found a [ROOTDRIVE] element, but it just adds ourSubFolder to the
TargetDir, instead.

Seems like life is spent coding for the smallest of exceptions.

This is my first .Net development effort, by the way. Still trying to
learn all the nooks & crannies. Thanks for any input!
Gabriel Lozano-Mor?n - 04 Apr 2005 11:01 GMT
[SYSTEMDRIVE] is an environment variable that will return you the rootdrive
of where Windows is installed.

Gabriel Lozano-Mor?n

> The app we are developing uses an older COM component that apparently
> does not recognize long directory names. So, when we created our Setup
[quoted text clipped - 18 lines]
> This is my first .Net development effort, by the way. Still trying to
> learn all the nooks & crannies. Thanks for any input!
StevenBarnes - 04 Apr 2005 14:02 GMT
What sort of syntax is used? In the File System setup, I tried creating
a "custom folder" with a DefaultLocation of [SYSTEMDRIVE]. Then the
subfolder under that, that I wanted. Installation still created the
subfolder off the [TARGETDIR], or app's install path.

I then just made a "custom folder" with no sub folders, and set it's
DefaultLocation to [SYSTEMDRIVE]\ISISTest. When I run *that* install, I
get an error box "Could not access network location \ISISTest."

I'm not sure where to use this env var.

Thanks!
Gabriel Lozano-Mor?n - 04 Apr 2005 14:19 GMT
My mistake I though it was possible this way because I have used it several
times when I define the path using the /i commando line parameter of the
msi.

To get the systemdrive in the setup you need [WindowsVolume]\ISISTest

Please reply if this still doesn't help you.

Gabriel Lozano-Mor?n

> What sort of syntax is used? In the File System setup, I tried creating
> a "custom folder" with a DefaultLocation of [SYSTEMDRIVE]. Then the
[quoted text clipped - 8 lines]
>
> Thanks!
Vipul Patel - 05 Apr 2005 17:25 GMT
Hello Steven,

What you need to do is to modify the DefaultLocation property of your
Application folder to [WindowsVolume]\DesiredFolderName

This will make the contents of the application folder go to the destined
location as desired by you.

Regards
Vipul
C# MVP

> What sort of syntax is used? In the File System setup, I tried creating
> a "custom folder" with a DefaultLocation of [SYSTEMDRIVE]. Then the
[quoted text clipped - 8 lines]
>
> Thanks!
Vipul Patel - 05 Apr 2005 17:27 GMT
Hello Steven,

You need not add a custom folder. Instead modify the Default Location
property of your application folder to [WindowsVolume]\DesiredFolderName.

That shoudl achive what you want.

Regards
Vipul

> What sort of syntax is used? In the File System setup, I tried creating
> a "custom folder" with a DefaultLocation of [SYSTEMDRIVE]. Then the
[quoted text clipped - 8 lines]
>
> Thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.