DevAdmin Blog

Blog di Ermanno Goletto (Microsoft MVP Directory Services - MCITP - MCTS - MCSA - MCP)
posts - 975, comments - 549, trackbacks - 8

My Links

News

Avatar

Curriculum Vitae

Visualizza il profilo di Ermanno Goletto su LinkedIn

Follow ermannog on Twitter


Il contenuto di questo blog e di ciascun post viene fornito “così come é”, senza garanzie, e non conferisce alcun diritto. Questo blog riporta il mio personale pensiero che non riflette necessariamente il pensiero del mio datore di lavoro.

Logo Creative Commons Deed


Server Infrastructure Days 2013 - Milano - 18 e 19 Giugno


Logo SysAdmin.it SysAdmin.it Staff


Logo TechNet Forum TechNet Italia @ForumTechNetIt Follow TechNet Forum on Twitter


Logo MVP

Article Categories

Archives

Post Categories

Blogs

Friends

Knowledge Base

MVP Sites

Resources

Eseguire comandi diversi a seconda del sistema operativo in uno script

Vi sono vari metodi per distingure il sistema operativo in uno script ed eseguire di conseguenza comandi diversi uno è quello di usare il comando ver:

@echo off

ver | find "XP" > nul
if not errorlevel 1 goto Win_XP

ver | find "98" > nul
if not errorlevel 1 goto Win_98

echo OS undetermined.
pause
goto exit

:Win_XP
@echo on
@echo Windows XP
NET USE N: \\Servername\sharenameVolumeN /persistent:no
goto exit

:Win_98
@echo on
@echo Windows 98
NET USE T: \\Servername\SharenameVolumeT
goto exit

:exit

Per ulteriori informazioni si veda il seguente: http://support.microsoft.com/kb/318689/it.

Print | posted on Thursday, December 27, 2007 5:49 PM | Filed Under [ Links Code, Snippets & Scripts IT ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 7 and 7 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET