Script runs under NT but not Win2000!! Help Please 
Author Message
 Script runs under NT but not Win2000!! Help Please

CA Unicenter TNG 2.2 Manuals
http://www.*-*-*.com/

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--


Quote:
> This is part of a scripting source file which is called as part of an
> NT Login script.  I'm not sure what the scripting language is, came
> from Computer Associates. All this bit does is run ipconfig ( for NT &
> 2000 ) or winipconfig ( 95 ) and redirect the output to a textfile
> Been running happily on NT and 95 but generates an application error
> from ipconfig.exe when run on a W2000 client.

> Can anyone shed any light?

> rem Check where OS was booted from
> commandspec = ENVGETSTRING("COMSPEC")
> rem Prevent persistent drive mappings
> Execute(commandspec +" /c net use /persistent:NO")

> if not(ExistDirectory("C:\tng")) then
> Execute(commandspec +" /c md c:\tng")
> end if

> rem Part 1
> rem Generate a locally stored ipconfig.txt file in order to
> rem read the Default Gateway entry

> rem Check OS....
> if EnvGetString("OS") = "Windows_NT" then
> goto notWin9x
> end if
> if ExistFile("C:\Windows\Explorer.exe") then
> goto Win9x
> end if
> NotWin9x:
> Rem Windows NT and W2000 machines
> DOSStatement=commandspec +" /c ipconfig.exe>C:\TNG\IPCONFIG.TXT"
> goto mapdrive
> Win9x:
> Rem Windows 95 requires a different syntax - supported in Win98
> IPStatement="WINIPCFG /BATCH ""C:\TNG\IPCONFIG.TXT""
> DOSStatement=commandspec + " /c " + IPStatement
> mapdrive:
> Execute(DOSStatement,TRUE)
> sleep(1000)



Tue, 02 Sep 2003 22:32:32 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. why would i get syntax error on NT 4 but not on win2000

2. Help!, runs on 95/98 but not on NT

3. W2k Pro not running NT 4 Logon Script

4. Need to turn this .cmd file from an NT server into a VB Script Please Help

5. Trying to Run Remote Script - Please Help!!!

6. HELP PLEASE - Why does this script not work?

7. HELP PLEASE - Why does this script not work?

8. script won't run....Please help!

9. PLEASE HELP PLEASE HELP PLEASE HELP

10. Script will not run remotely =- Help

11. Creating ADO recordset w/o database .Append not working correctly IIS5 win2000 Prof not .Net

12. Checking if NT services are running and starting if not

 

 
Powered by phpBB® Forum Software