Page 1 of 1 1
Topic Options
#169114 - 2006-10-09 09:19 PM %0\..\ and PUTINENV.exe
Georges_K Offline
Getting the hang of it

Registered: 2005-02-17
Posts: 83
Loc: Chino, CA
Hello,
I have a quick question about %0\..\ in a Win9x environment.

I'm in a Multi Site/Multi LogonServer setting, so I'm looking to run my kix scripts from the local AD sites, as it possibly involves copying some files over the WAN otherwise.

I have used the %0\..\ to refer to the NETOGON directory before, but for some reason, when I use it now, I am not getting the result I'm expecting. the code I have in the batch file is pretty simple:

Code:
 @echo off

If /i (%OS%) == (Windows_NT) Goto NT
Goto Win9x

:Win9x
If Exist %WINDIR%\putinenv.exe Goto setVar
Copy %0\..\PUTINENV.EXE %WINDIR%\

:setVar
%WINDIR%\putinenv.exe L
\\cvusd-DO-dc2\NETLOGON\Winset USERNAME=%USERNAME%
\\cvusd-DO-dc2\NETLOGON\Winset COMPUTERNAME=%COMPUTERNAME%
\\cvusd-DO-dc2\NETLOGON\Winset LOGONSERVER=%LOGONSERVER%



when I get to the point where it tries to copy PUTINENV.exe to %WINDIR%, I get an error saying "invalid directory".

is there something blately obvious that I'm missing here? I don't recall this usually being a big problem..

Thanks for any help you may provide.
_________________________
Network Specialist
Chino Unified School District

Top
#169115 - 2006-10-09 11:00 PM Re: %0\..\ and PUTINENV.exe
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4567
Loc: USA
It may have something to do with spaces in your path. Try adding some quotes.
Top
#169116 - 2006-10-09 11:10 PM Re: %0\..\ and PUTINENV.exe
Georges_K Offline
Getting the hang of it

Registered: 2005-02-17
Posts: 83
Loc: Chino, CA
Ok, I withdraw my question. after playing around with it, i found that the trailing slash after %WINDIR% was causing the problem, the invalid directory error wasn't because it couldn't find %0\..\ but because %WINDIR%\ was returning an invalid.

just an FYI in case anyone has a similar problem.
Thanks for the assistance anyway!

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1183 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.057 seconds in which 0.032 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org