PDA

View Full Version : Problem with mapped drives?



NewsArchive
11-04-2007, 08:54 AM
I'm using the "Get INI Value" facility to grab a value from an INI
file that's on my local system, but the specified path is actually via
a local network mapping. IOW, c:\clarion4\super\bbs\locale.ini is the
same as x:\bbs\locale.ini.

This has always worked, but suddenly it's not fetching the value. I
have to change it to use the non-mapped path for it to work.

I'm running Vista. When I view my drives in Explorer, it often shows
an "X" beside these locally mapped drives, enough though they are
accessible. Sometimes the "X" goes away after I click on it, and
sometimes it remains. I wonder whether SB could be getting confused
by the same thing, and is simply not trying because it thinks the
resource is unavailable.

BTW, under XP I used to use SUBST at startup, but that doesn't work on
Vista. Apparently you need to run SUBST for both the current user and
"All Users" for all your shortcutted programs to see the drives.
Rather than wrestle with this, I just shared the applicable
directories, and then used network drive mapping.

Mike Hanson
www.boxsoft.net

NewsArchive
11-04-2007, 08:55 AM
Hi Mike,

It has nothing to do with SetupBuilder :) There are quite a few problems
with mapped drives under Vista.

BTW, here is an interesting reading:

http://support.microsoft.com/kb/938062

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
11-04-2007, 08:56 AM
Hi Friedrich,

>It has nothing to do with SetupBuilder :) There are quite a few problems
>with mapped drives under Vista.

See my reply to Mike. This problem (with mapped share connections,
not SB:) is also under XP (as far as I recall it's always been like
this) I think it depends on what file access modes are used to access
the file. I have a feeling that the INI access apis are fairly
unintrusive, which may be why they don't force the network connection.


Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
11-04-2007, 08:56 AM
By the way, one more thing. I assume your installer requests administrator
execution level privileges (SetupBuilder does it by default). Perhaps the
process that mapped the network drive did not run elevated (only had
"Standard User" privileges)?

Map the drive with administrator execution level privileges and you should
be done.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
11-04-2007, 08:57 AM
>By the way, one more thing. I assume your installer requests administrator
>execution level privileges (SetupBuilder does it by default). Perhaps the
>process that mapped the network drive did not run elevated (only had
>"Standard User" privileges)?
>
>Map the drive with administrator execution level privileges and you should
>be done.

In this particular case, the INI file is only on my development
system. The installer does various things differently, depending on
whether it's running it here or somewhere else.

I drop the mappings, then explicitly re-run them as an administrator,
to see if that makes any difference.

Mike Hanson
www.boxsoft.net

NewsArchive
11-04-2007, 08:58 AM
Hi Mike,

>I'm running Vista. When I view my drives in Explorer, it often shows
>an "X" beside these locally mapped drives, enough though they are
>accessible. Sometimes the "X" goes away after I click on it, and
>sometimes it remains. I wonder whether SB could be getting confused
>by the same thing, and is simply not trying because it thinks the
>resource is unavailable.

I get this in various software if I haven't accessed the drive via
Explorer or Total Commander prior to running the software. It appears
that some file actions force the OS to check the availability of the
share, others do not so they will simply report that the file doesn't
exist or do nothing.

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
11-04-2007, 08:58 AM
>I get this in various software if I haven't accessed the drive via
>Explorer or Total Commander prior to running the software. It appears
>that some file actions force the OS to check the availability of the
>share, others do not so they will simply report that the file doesn't
>exist or do nothing.

This wouldn't surprise me. I run into a similar situation on a
network of my client, where I cannot run shortcuts to network-based
programs until I've accessed the drive via Explorer. In that case,
though, the logon screen pops up.

I suppose that's what's happening with SB and INI files, even though
those connections are on my own machine and no logon is required. If
that's the case, I think SB may need to use a stronger access method,
one that will force the connection.

Mike Hanson
www.boxsoft.net

NewsArchive
11-05-2007, 02:13 AM
Hi Arnór,

Interesting. Thanks for the information!

Friedrich

NewsArchive
11-05-2007, 02:16 AM
Hi Mike,

>I suppose that's what's happening with SB and INI files, even though
>those connections are on my own machine and no logon is required. If
>that's the case, I think SB may need to use a stronger access method,
>one that will force the connection.

It sounds to me that SB uses GetIni (if it's in Clarion) or
ReadPrivateProfile* apis to do this and I would not be surprised if
those reads do not force refreshing mapped drives. What you could
perhaps do is to use a dll or something that you pass the path to and
it will force some action that forces the connection. I haven't tried
this and I haven't figured out what actions exactly would be needed,
but I now that some actions do force the OS to check and refresh the
network connections... WNetGetConnection looks like an option that
might work...

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
11-06-2007, 01:19 AM
It's not a pressing issue for the moment, but I'll keep this handy in
case I need to tinker with it some more.

For now, I've just changed the SB script to refer to the original
path, rather than the mapped one.

Mike Hanson
www.boxsoft.net

NewsArchive
11-06-2007, 01:20 AM
Hi Mike,

Arnór is right. The installer uses the GetPrivateProfile* Windows APIs.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
11-06-2007, 01:21 AM
Hi Mike,

>For now, I've just changed the SB script to refer to the original
>path, rather than the mapped one.

Just got reminded of this this morning when I woke my Vista laptop up
and it told me that the drive where I keep my Agenda At Once db could
not be reached. The funny thing was that it was already connected to
it and was showing me reminders from that very database<bg>

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php