myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


UNC path not supported

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> UNC path not supported Page: [1]
Login
Message << Older Topic   Newer Topic >>
UNC path not supported - 8/12/2008 11:42:55 PM   
darklord12

 

Posts: 49
Score: 0
Joined: 7/23/2008
Status: offline
When I do a local testing and run a batch file as shown below to silently install a package, it works flawlessly.


setup.exe /s /uninst /f1.\uninstall.iss
setup.exe /s /f1.\pacs.iss
xcopy "drsys.ini" "c:\drs\sys\data" /y /c /i
pause

The problem is after I copy the package to the site server's distribution point and try to push out the package to clients using the same batch file as shown above, it fails as shown in the embedded picture giving me an UNC not supported error.  Also after each command line ran, I also receive a Windows XP Setup dialog box stating  "Please go to Control Panel to install and configure system component".  It seems like the program or windows doesn't support UNC?  Anyone knows a solution to this. 




Thumbnail Image


Attachment (1)

< Message edited by darklord12 -- 8/12/2008 11:51:49 PM >
Post #: 1
RE: UNC path not supported - 8/13/2008 12:47:41 AM  1 votes
jnelson993


Posts: 925
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
I'm assuming the SETUP.EXE and the DRSYS.INI are in the same folder as the .BAT file on the DP? 

When you want a batch file to run properly from a DP as a UNC, you have to make sure your .bat references the dp path properly by first setting a variable like this

SET MyDIR=%~dp0

And then, when you reference something from the source folder, your .bat file needs to reference it like this

%MyDIR%Setup.exe       (note, the MyDIR includes the trailing backslash so we don't include it)

So here's how I THINK I'd change your script

@ECHO OFF
SETLOCAL

SET THISDIR=%~dp0
%THISDIR%setup.exe /s /uninst /f1%THISDIR%uninstall.iss
%THISDIR%setup.exe /s /f1%THISDIR%pacs.iss
xcopy "%THISDIR%drsys.ini" "c:\drs\sys\data" /y /c /i
pause

EXIT 0



_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to darklord12)
Post #: 2
RE: UNC path not supported - 8/13/2008 2:17:27 AM   
darklord12

 

Posts: 49
Score: 0
Joined: 7/23/2008
Status: offline
Thank you, it works! but one of the folder within the path to the package has space in its name, for example,  \\server\distribution software\package.  This will cause unrecognized external or internal command.  How do I add a quotation ("") around the path in the script above?

< Message edited by darklord12 -- 8/13/2008 2:19:19 AM >

(in reply to jnelson993)
Post #: 3
RE: UNC path not supported - 8/13/2008 2:19:58 AM   
jnelson993


Posts: 925
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
I would say something like this:

@ECHO OFF
SETLOCAL

SET THISDIR=%~dp0
"%THISDIR%setup.exe" /s /uninst /f1"%THISDIR%uninstall.iss"
"%THISDIR%setup.exe" /s /f1"%THISDIR%pacs.iss"
xcopy "%THISDIR%drsys.ini" "c:\drs\sys\data" /y /c /i
pause

EXIT 0

_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to darklord12)
Post #: 4
RE: UNC path not supported - 8/13/2008 2:24:33 AM   
jnelson993


Posts: 925
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
Or if those quotes mess things up, you could just convert it to a short name by changing:

SET THISDIR=%~dp0
to this
SET THISDIR=%~dps0

That might make it easier.

_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to jnelson993)
Post #: 5
RE: UNC path not supported - 8/13/2008 12:40:33 PM   
darklord12

 

Posts: 49
Score: 0
Joined: 7/23/2008
Status: offline
It worked when I test it locally.  However when I reference the package from another computer (for example, \\computer\package\pacs.bat), then the batch file appears to be running from start to end with no error message, but nothing happen - the program does not get installed.  The only line of command that seem to work is the xcopy command line. Perhaps it has to do with security setting?

< Message edited by darklord12 -- 8/13/2008 2:33:53 PM >

(in reply to jnelson993)
Post #: 6
RE: UNC path not supported - 8/13/2008 2:49:29 PM   
jnelson993


Posts: 925
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
Perhaps...if there are no error messeges in the shell window, then it's probably something to do with permissions or it doesn't like the quotes  with the /F1"...  stuff.

Comment out he  @ECHO OFF so you can see the actual command lines that it's running (comment it out by putting :: before it or REM)

::@ECHO OFF
or
REM @ECHO OFF

_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to darklord12)
Post #: 7
RE: UNC path not supported - 8/13/2008 3:20:28 PM   
darklord12

 

Posts: 49
Score: 0
Joined: 7/23/2008
Status: offline
Yes it is the permission.  Apparently I found out that we have a conflict between share and windows nt permissions.  It works fine now when I reference it.  Now I will try to push it out via SCCM and see how it goes.  By the way, I would like to learn more about scripting that you showed me in this post.  Do you know a good scripting book that you can recommend me?  Thank you for your help.

(in reply to jnelson993)
Post #: 8
RE: UNC path not supported - 8/13/2008 3:52:32 PM   
jnelson993


Posts: 925
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
Hmm, I don't know about any good scripting books on windows shell scripting because it's so 1998.  The information I've got I gleaned from either other people or from the help system within the utilities themselves.

Here are the most useful ones...from a command prompt type:
FOR /?
SET /?
CMD /?



_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to darklord12)
Post #: 9
RE: UNC path not supported - 8/14/2008 11:35:50 AM   
jquirk822


Posts: 189
Score: 12
Joined: 2/20/2003
Status: offline
Command shell scripting is now getting to be a touch old-school, but if you are interested the best book around is probably Timothy Hill's excellent "Windows NT Shell Scripting"

Amazon list it here

(in reply to jnelson993)
Post #: 10
RE: UNC path not supported - 8/14/2008 2:03:30 PM   
mhudson

 

Posts: 542
Score: 12
Joined: 4/1/2007
From: College Station, TX
Status: offline
Why not tell use the "assign drive letter" or in the batch file map a drive letter or simply push it to the cache of the client and run it from there.

_____________________________

Matthew Hudson
http://sms-hints-tricks.blogspot.com/
http://www.sccm-tools.com

(in reply to jquirk822)
Post #: 11
RE: UNC path not supported - 8/14/2008 3:00:15 PM  1 votes
jnelson993


Posts: 925
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
I can't speak for him, but I know I've been on teams where there are so many mapped network drives that there are no drive letters left and it fails unless you go to UNC.  But yeah, good point.  I was so busy responding to the question that I didn't ask the obvious...can you download and execute instead?


_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to mhudson)
Post #: 12
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> UNC path not supported Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.359