Guest http://books.google.com/books?id Posted September 15, 2009 Posted September 15, 2009 On 15 Wrz, 13:54, "http://books.google.com/books? id=ifqnAAAACAAJ&dq=inauthor:%22Russ+Manning %22&lr=&as_brr=0&rview=1&source=gbs_book_other_versions_r&cad=2" wrote: > On 15 Wrz, 09:43, shatztal wrote: > > > > > thanks again i will post there > > by the way i don't get any erros on the CMD line just that is does not run > > > "Pegasus [MVP]" wrote: > > > > "shatztal" wrote in message > > >news:5084E647-4A4D-4E2D-93E2-554D69585A29@microsoft.com... > > > > 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 & "rootcimv2") > > > > Set objWMIService2 = GetObject("winmgmts:" & > > > > "{impersonationLevel=impersonate,(Shutdown)}!" & _ > > > > Â Â Â strComputer & "rootcimv2") > > > > 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 > > > > Some comments about your post: > > > - You should report what happens and what you see when you run the script. > > > - Having the statement "On error resume next" on top of the code is not a > > > good idea. It prevents you from seeing errors that might occur. > > > - The line > > > Â WShell.run "cmd.exe /k |echo y |convert c: /FS:NTFS /X" > > > Â should probably read > > > Â WShell.run "cmd.exe /k |echo y |convert " & objItem.DeviceID & " /FS:NTFS > > > /X" > > > - This is a Windows XP newsgroup. For involved scripts like this one, you > > > should post in a VB Scripting newsgroup. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.