PC Review


Reply
Thread Tools Rate Thread

batch file and UNC paths

 
 
conrad
Guest
Posts: n/a
 
      10th Feb 2008
How does one alternatively get around
the problem of using UNC paths? I have
a batch file in a shared directory
with a file in the same directory. When
the share is accessed, it is unable to read
the file. It seems that problem is due to
the fact that it is a UNC path. What
is a way around this while keeping my
batch file and file it reads in the same
shared directory. I also mapped the drive.
But that didn't work either.

Additionally, are there any standard command
line tools for making modifications to a user's
outlook profile? Such as creating, deleting or
recreating shortcuts, etc?

--
conrad
 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      10th Feb 2008
See below.

"conrad" <(E-Mail Removed)> wrote in message
news:f3bf9ad0-17d0-48a5-ae8a-(E-Mail Removed)...
> How does one alternatively get around
> the problem of using UNC paths?


*** What problem?

> I have a batch file in a shared directory
> with a file in the same directory.


*** Let's have a look at the batch file!

> When the share is accessed, it is unable to read
> the file.


*** How exactly to you access the share?
*** What message do you get when you try to read the file?

> It seems that problem is due to
> the fact that it is a UNC path.


*** Can you access the file when you use a Drive:Folder path?

> What is a way around this while keeping my
> batch file and file it reads in the same
> shared directory. I also mapped the drive.
> But that didn't work either.


*** If this does not work either, what makes you think
*** that the problem is caused by the UNC path?

> Additionally, are there any standard command
> line tools for making modifications to a user's
> outlook profile? Such as creating, deleting or
> recreating shortcuts, etc?


*** What exactly to you mean with "creating a
*** shortcut in Outlook"?

> --
> conrad



 
Reply With Quote
 
conrad
Guest
Posts: n/a
 
      11th Feb 2008
On Feb 10, 2:36*pm, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
> See below.
>
> "conrad" <con...@lawyer.com> wrote in message
>
> news:f3bf9ad0-17d0-48a5-ae8a-(E-Mail Removed)...
>
> > How does one alternatively get around
> > the problem of using UNC paths?

>
> *** What problem?
>
> > I have abatchfile in a shared directory
> > with a file in the same directory.

>
> *** Let's have a look at thebatchfile!
>
> > When the share is accessed, it is unable to read
> > the file.

>
> *** How exactly to you access the share?
> *** What message do you get when you try to read the file?
>
> > It seems that problem is due to
> > the fact that it is a UNC path.

>
> *** Can you access the file when you use a Drive:Folder path?
>
> > What is a way around this while keeping my
> >batchfile and file it reads in the same
> > shared directory. I also mapped the drive.
> > But that didn't work either.

>
> *** If this does not work either, what makes you think
> *** that the problem is caused by the UNC path?



The relevant part is:
set fl=%CD%\user.txt

if exist %fl% (
for /F "eol= " %%u in (%fl%) do echo %%u:%pwd%
) else (
@echo Unable to locate %fl%
@echo Exiting...
)

Where the echo is currently I'll be using usermod
to modify active directory objects.

>
> > Additionally, are there any standard command
> > line tools for making modifications to a user's
> > outlook profile? Such as creating, deleting or
> > recreating shortcuts, etc?

>
> *** What exactly to you mean with "creating a
> *** shortcut in Outlook"?
>


There are components in outlook that reference
mail, calendar, etc.And they allow quick access to
one of those components. You also have an
option to create a shortcut to say subfolders
for quick access to subfolders, say a particular
directory for some filtered email. I was just curious
if there was some command line tool that would
allow modification of a user's outlook profile
to change such settings instead of having to
walk a user, over the phone, in creating such
shortcuts.

--
conrad
 
Reply With Quote
 
Pegasus \(MVP\)
Guest
Posts: n/a
 
      11th Feb 2008

"conrad" <(E-Mail Removed)> wrote in message
news:070e876c-aade-481d-94f1-(E-Mail Removed)...
On Feb 10, 2:36 pm, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:
> See below.
>
> "conrad" <con...@lawyer.com> wrote in message
>
> news:f3bf9ad0-17d0-48a5-ae8a-(E-Mail Removed)...
>
> > How does one alternatively get around
> > the problem of using UNC paths?

>
> *** What problem?
>
> > I have abatchfile in a shared directory
> > with a file in the same directory.

>
> *** Let's have a look at thebatchfile!
>
> > When the share is accessed, it is unable to read
> > the file.

>
> *** How exactly to you access the share?
> *** What message do you get when you try to read the file?
>
> > It seems that problem is due to
> > the fact that it is a UNC path.

>
> *** Can you access the file when you use a Drive:Folder path?
>
> > What is a way around this while keeping my
> >batchfile and file it reads in the same
> > shared directory. I also mapped the drive.
> > But that didn't work either.

>
> *** If this does not work either, what makes you think
> *** that the problem is caused by the UNC path?



The relevant part is:
set fl=%CD%\user.txt

if exist %fl% (
for /F "eol= " %%u in (%fl%) do echo %%u:%pwd%
) else (
@echo Unable to locate %fl%
@echo Exiting...
)

Where the echo is currently I'll be using usermod
to modify active directory objects.

>
> > Additionally, are there any standard command
> > line tools for making modifications to a user's
> > outlook profile? Such as creating, deleting or
> > recreating shortcuts, etc?

>
> *** What exactly to you mean with "creating a
> *** shortcut in Outlook"?
>


There are components in outlook that reference
mail, calendar, etc.And they allow quick access to
one of those components. You also have an
option to create a shortcut to say subfolders
for quick access to subfolders, say a particular
directory for some filtered email. I was just curious
if there was some command line tool that would
allow modification of a user's outlook profile
to change such settings instead of having to
walk a user, over the phone, in creating such
shortcuts.

--
conrad

====================

Your original question was about shares and UNC paths.
Your reply makes no reference to UNC paths, hence I am
unable to comment on it.

Your batch file lines
set fl=%CD%\user.txt
if exist %fl% (
may or may not work, depending on your current working
directory. It would be much safer to code like so:
set fl=%CD%\user.txt
if exist "%fl%" (

I also wonder just how robust your code is when using the
%CD% environmental variable. Do you really know at
all times where the user is? If you do, why not hard-code
it into the batch file?

I am not aware of any command line facilities that let
you modify components in Outlook. However, instead
of "walking" to each machine when assisting a user, you
should consider using some remote support tool such as
Remote Assistance or WinVNC.


 
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
A script/batch to kill a batch file from scheduled tasks? Bogdan Windows XP Configuration 1 31st Jul 2009 06:05 AM
batch file call from a macro - how ? and required batch format VB-rookie Microsoft Excel Programming 3 5th Sep 2008 10:33 PM
calling multiple batch files from within a batch file yawnmoth Windows XP General 3 26th May 2008 06:47 PM
Batch file works in command line but not as a batch Danger Windows XP General 7 5th Feb 2008 04:50 PM
Save batch window msgs to a file from the batch prog Stephen Rainey Windows XP General 3 10th Jan 2007 12:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:29 AM.