Search found 160 matches

by MKANET
05 Jul 2012 21:14
Forum: DOS Batch Forum
Topic: Is it possible to add another command, same line as CALL :
Replies: 9
Views: 5767

Re: Is it possible to add another command, same line as CALL

I should have probably rephrased my question. I was hoping to run a subsequent command after it completes processing the subroutine . I've never been able to do that; but, thought maybe there is a way to do it. Did you try this? (Call :subroutine ) & echo subroutine complete I doubt it, he didn'...
by MKANET
05 Jul 2012 19:32
Forum: DOS Batch Forum
Topic: Is it possible to add another command, same line as CALL :
Replies: 9
Views: 5767

Is it possible to add another command, same line as CALL :

In the below call command, is there anyway to add a completely different command on the same line; or, is everything after the call label treated as respective parameters?

I am guessing there is no way. But just wanted to be certain.

Call :subroutine &echo subroutine complete
by MKANET
05 Jul 2012 17:17
Forum: DOS Batch Forum
Topic: Trying to build a Uptime.exe alternative via native windows
Replies: 31
Views: 33521

Re: Trying to build a Uptime.exe alternative via native wind

Win7 64bit. Not the same; even after correcting timezone offset. wmic shows: 2012/06/30 12:22:56 event id 12 shows: 2012/06/30 19:23:01 wmic OS Get LastBootUpTime LastBootUpTime 20120630122256.633147-420 Event 12 operating system started at system time ‎2012‎-‎06‎-‎30T19:23:01.109999300Z.
by MKANET
05 Jul 2012 16:22
Forum: DOS Batch Forum
Topic: Trying to build a Uptime.exe alternative via native windows
Replies: 31
Views: 33521

Re: Trying to build a Uptime.exe alternative via native wind

Surprisingly, I couldn't find any system events that matched up exactly with wmic. So, this still remains a mystery. However, at least, I did confirm that Microsoft's Uptime.exe utility comes from the pagefile last modified time stamp. Event ID = 6009 was one second different than the pagefile last ...
by MKANET
05 Jul 2012 14:28
Forum: DOS Batch Forum
Topic: Trying to build a Uptime.exe alternative via native windows
Replies: 31
Views: 33521

Re: Trying to build a Uptime.exe alternative via native wind

Does anyone know where the wmic OS Get LastBootUpTime command originally get's it's boot start time from? I know that the Windows Uptime.exe app bases it's info from a timestamp on the system page file. I think that systeminfo | find "Boot Time" also comes from the pagefile timestamp. I kn...
by MKANET
05 Jul 2012 13:40
Forum: DOS Batch Forum
Topic: Trying to build a Uptime.exe alternative via native windows
Replies: 31
Views: 33521

Re: Trying to build a Uptime.exe alternative via native wind

Hi Antonio, actually the whole point was to keep from having to depend on external exe's in this case. However that link may come in handy in the future. Thanks. I also wondered the same thing. Not sure what that is after the decimal point. You may also use my StdTime and StdDate programs for Time-t...
by MKANET
05 Jul 2012 11:06
Forum: DOS Batch Forum
Topic: Trying to build a Uptime.exe alternative via native windows
Replies: 31
Views: 33521

Re: Trying to build a Uptime.exe alternative via native wind

Thanks foxdrive. The below time difference code is what I was looking for. I'll make sure I hang on to it. Thanks! :TimeDifference Return_Variable Start_Date_Time Stop_Date_Time :: Version -0 2009-12-25 Frank P. Westlake :: Calculate the difference in time between parameter 2 and parameter 3 :: and ...
by MKANET
04 Jul 2012 22:12
Forum: DOS Batch Forum
Topic: Trying to build a Uptime.exe alternative via native windows
Replies: 31
Views: 33521

Trying to build a Uptime.exe alternative via native windows

I am curious if there is existing dos batch file code that can calculate how many days, hours, minutes, and seconds a remote machine has been up. I can get the date and time a remote machine booted up. Very fast method: wmic /node:"%remotemachine%" OS Get LastBootUpTime Slow: systeminfo /s...
by MKANET
04 Jul 2012 16:16
Forum: DOS Batch Forum
Topic: How to tell if a physical HDD has failed withno drive letter
Replies: 9
Views: 5885

Re: How to tell if a physical HDD has failed withno drive le

Hi Ed, thanks for replying. Unfortunately WMIC diskdrive does not display disk volume labels; which is the only reliable/consistent information I can depend on Backup HDD volume label is always labeled: " Backup " . Anyway, below is the only way I know of to reliably detect if the "Ba...
by MKANET
04 Jul 2012 01:41
Forum: DOS Batch Forum
Topic: How to tell if a physical HDD has failed withno drive letter
Replies: 9
Views: 5885

Re: How to tell if a physical HDD has failed withno drive le

What would happen if the disk isn't shared and the disk still hasn't failed That's why I was suggesting that a temporary share would have to be created originally. However, even then, I dont think it would still be reliable for the reason I mentioned in my previous post; which looks like it needs th...
by MKANET
04 Jul 2012 01:38
Forum: DOS Batch Forum
Topic: How to tell if a physical HDD has failed withno drive letter
Replies: 9
Views: 5885

Re: How to tell if a physical HDD has failed withno drive le

I dont think I explained this very well. I don't care how the script detects if a disk has failed or not; as long as it's reliable. I was just saying it's possible that disk may be empty (where no files or folders are on it). One more thing to consider.. Considering that the "Backup" folde...
by MKANET
03 Jul 2012 23:19
Forum: DOS Batch Forum
Topic: How to tell if a physical HDD has failed withno drive letter
Replies: 9
Views: 5885

Re: How to tell if a physical HDD has failed withno drive le

Hmmm... Do you mean to blindly try to give it a temporary share name; and, if that share doesn't exist, then it means the hard drive has failed? Then, blindly unshare it.
by MKANET
03 Jul 2012 16:29
Forum: DOS Batch Forum
Topic: How to tell if a physical HDD has failed withno drive letter
Replies: 9
Views: 5885

How to tell if a physical HDD has failed withno drive letter

How can I tell if a physical disk has failed on a remote machine if the disk doesn't have a logical drive letter? The physical drive is pointing to a subdirectory on another physical disk using "Mount in Empty NTFS Folder" feature of Windows. Supposing that: Physical disk label is called: ...
by MKANET
06 Jun 2012 14:45
Forum: DOS Batch Forum
Topic: Desperate to change command window buffer size or alternate
Replies: 3
Views: 7058

Re: Desperate to change command window buffer size or altern

Simple solution...

AutoIt, again, saved me. It has the ability to change the console buffer without changing the height. Problem resolved!
by MKANET
06 Jun 2012 13:03
Forum: DOS Batch Forum
Topic: Desperate to change command window buffer size or alternate
Replies: 3
Views: 7058

Re: Desperate to change command window buffer size or altern

I am able to circumvent this bug by using the below subroutine (without an external utility). However, the current syntax to use it is far too different than what I'm using now. So, maybe there's a way to use this technique; however, still keep very close to the same syntax I currently have in my gi...