S
shatztal
The Script is in VBscript an should check if the filesystem is not NTFS, if
not it should convert it. this is what i have but the convert command does
not work .
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objWMIService2 = GetObject("winmgmts:" &
"{impersonationLevel=impersonate,(Shutdown)}!\\" & _
strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalDisk
where drivetype ='3'",,48)
Set colOperatingSystems = objWMIService2.ExecQuery("Select * from
Win32_OperatingSystem")
Set WShell = WScript.CreateObject("Wscript.Shell")
wscript.Echo "We Are making now changes"
for each objItem in colItems
' set objItem = colItems.item(0)
FS = objItem.Filesystem
if FS = "NTFS" then
msgbox "מחשבך מוכן לשימוש תקין"
else
Wscript.Echo "Non NTFS Files"
WShell.run "cmd.exe /k |echo y |convert c: /FS:NTFS /X"
msgbox "×â€Ã—ž×—שב יתחיל ב×Âתחול בעוד רגעינספורי×Â"
counter = 15
do while counter > 0
Wscript.echo counter
wscript.sleep 1000
counter = counter -1
loop
msgbox "×â€Ã—ž×—שב מבצע ×Âתחול"
For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Reboot()
Next
end if
next
not it should convert it. this is what i have but the convert command does
not work .
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objWMIService2 = GetObject("winmgmts:" &
"{impersonationLevel=impersonate,(Shutdown)}!\\" & _
strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalDisk
where drivetype ='3'",,48)
Set colOperatingSystems = objWMIService2.ExecQuery("Select * from
Win32_OperatingSystem")
Set WShell = WScript.CreateObject("Wscript.Shell")
wscript.Echo "We Are making now changes"
for each objItem in colItems
' set objItem = colItems.item(0)
FS = objItem.Filesystem
if FS = "NTFS" then
msgbox "מחשבך מוכן לשימוש תקין"
else
Wscript.Echo "Non NTFS Files"
WShell.run "cmd.exe /k |echo y |convert c: /FS:NTFS /X"
msgbox "×â€Ã—ž×—שב יתחיל ב×Âתחול בעוד רגעינספורי×Â"
counter = 15
do while counter > 0
Wscript.echo counter
wscript.sleep 1000
counter = counter -1
loop
msgbox "×â€Ã—ž×—שב מבצע ×Âתחול"
For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Reboot()
Next
end if
next