Search found 590 matches

by Compo
11 Dec 2021 17:10
Forum: DOS Batch Forum
Topic: Simple Counter Issue
Replies: 10
Views: 5276

Re: Simple Counter Issue

You did say the the registry example wasn't relevant, and for my own example I did say
Compo wrote:
08 Dec 2021 14:45
Whilst kind of irrelevant,<snip />
by Compo
08 Dec 2021 15:21
Forum: DOS Batch Forum
Topic: Simple Counter Issue
Replies: 10
Views: 5276

Re: Simple Counter Issue

I have no idea why you keep harping on a forum post which has already been resolved. The only reason to do so would be to point out imperfections in others. Okay, just to be clear, I'm not keeping harping on about it, my one comment mentioned it, your reply, instead of just closing it out, with Com...
by Compo
08 Dec 2021 14:45
Forum: DOS Batch Forum
Topic: Simple Counter Issue
Replies: 10
Views: 5276

Re: Simple Counter Issue

Thank you for trying to convince me that I'm attempting what should be a relatively simple task. I'm generating a list of installed 64-bit application was completely irrelevant, regardless of your failure to do so . If it wasn't relevant, why include it at all, your question would simply have read, ...
by Compo
08 Dec 2021 13:19
Forum: DOS Batch Forum
Topic: Simple Counter Issue
Replies: 10
Views: 5276

Re: Simple Counter Issue

What makes you think, (even if you have potentially and deliberately removed your code to determine where the end user's PC, was running a 64-bit Windows Operating System), that every application listed under that key are 64-bit too?
by Compo
01 Oct 2021 16:14
Forum: DOS Batch Forum
Topic: wmic os get BuildNumber
Replies: 3
Views: 4029

Re: wmic os get BuildNumber

Is this a trick question????? Your thread title is the exact code that gets the operating system build number. And just to be a little less cryptic; I suppose the first thing you should do is to review your own code, and fix your obvious typo's. Changing BIOS Get Get BuildNumbe to OS Get BuildNumbe...
by Compo
30 Sep 2021 17:32
Forum: DOS Batch Forum
Topic: How to get READONLY Status for Current disk drive (usb) - like diskpart/attr disk
Replies: 15
Views: 11188

Re: How to get READONLY Status for Current disk drive (usb) - like diskpart/attr disk

Thank you very much friend, but this script does not work on target operating system (windows 7 up to 10 - PT-BR). but I'll save your tip for newer versions. Well your question, at the time of both the original code and my repost of it, did not stipulate the Operating Systems it must work on, and o...
by Compo
30 Sep 2021 12:04
Forum: DOS Batch Forum
Topic: How to get READONLY Status for Current disk drive (usb) - like diskpart/attr disk
Replies: 15
Views: 11188

Re: How to get READONLY Status for Current disk drive (usb) - like diskpart/attr disk

Hi again, well, as I still haven't got an alternative, <Snip> </Snip> I'm still looking for an alternative to Diskpart... I thought that my previous reply may have been an alternative? Granted it is untested, and is only available in Windows 8/Server 2012 onwards Here's a quick untested idea: @Set ...
by Compo
29 Sep 2021 14:52
Forum: DOS Batch Forum
Topic: How to get READONLY Status for Current disk drive (usb) - like diskpart/attr disk
Replies: 15
Views: 11188

Re: How to get READONLY Status for Current disk drive (usb) - like diskpart/attr disk

If your batch file is already running from that drive, then it cannot be 'read only', just 'read', as it clearly has the 'execute' attribute! Are you therefore trying to determine whether the root directory, and/or its children are writeable? or something else? Here's a quick untested idea: @Set "DL...
by Compo
28 Sep 2021 08:58
Forum: DOS Batch Forum
Topic: display time in 12 hr
Replies: 25
Views: 27692

Re: display time in 12 hr

Sorry atfon, I did not see your edit, until afterwards, either way, my point was the same, the settings changed, just not manually.
by Compo
28 Sep 2021 08:38
Forum: DOS Batch Forum
Topic: display time in 12 hr
Replies: 25
Views: 27692

Re: display time in 12 hr

Yes atfon, you've changed your settings between both of those examples! It clealy shows in your two outputs, that the first item has a -300 minute offset from UTC, and the second a -240 minute offset from UTC. The behavior you're reporting therefore is not with WMI, but with changes to your current ...
by Compo
27 Sep 2021 17:28
Forum: DOS Batch Forum
Topic: Efficient Code
Replies: 7
Views: 5674

Re: Efficient Code

Just perform a variable expansion and substitution on %PC%. The following snippet would replace both / and , with nothing … @Set "PC=%PC:/=%" @( Echo Event,Date,Time,Device,User,IP,SN,Model Echo Login,%DATE%,%TIME:~,8%,%COMPUTERNAME%,%USERNAME%,%IP%,%SN:~,20%,%PC:,=% ) 1>"//PC500/Demo/Source/%RANDOM...
by Compo
26 Sep 2021 17:37
Forum: DOS Batch Forum
Topic: Efficient Code
Replies: 7
Views: 5674

Re: Efficient Code

If there is always only one IP Address, and at login that address is already determined, and both of your shown WMIC queries return actual values, i.e. they are never empty, then I would say it could certainly be made more efficient. The reason is that WMIC.exe is historically a relatively slow comm...
by Compo
03 Sep 2021 07:46
Forum: DOS Batch Forum
Topic: Powershell Performance Recommendations
Replies: 15
Views: 7511

Re: Powershell Performance Recommendations

Hello Compo. Thank you for your multitude of critiques. As I've pointed out more than once, I'm still learning and welcome suggestions. It doesn't seem that you were very welcoming of my critique. I did not just make a blanket statement, I explained why I thought that your variation was not as good...
by Compo
02 Sep 2021 20:40
Forum: DOS Batch Forum
Topic: Powershell Performance Recommendations
Replies: 15
Views: 7511

Re: Powershell Performance Recommendations

Why did you change the code I provided? Whilst I'm all for having a particular style etc. I don't understand why you'd use a variation which defines a minimum of four, possibly five variables and uses two for loops, over one which defines only one variable and uses one for loop. Additionally, your v...
by Compo
02 Sep 2021 13:48
Forum: DOS Batch Forum
Topic: Powershell Performance Recommendations
Replies: 15
Views: 7511

Re: Powershell Performance Recommendations

Just to provide a small counter argument to your statement In my script I have occasions to grab information which is not available from the command line. The information you require in your example script is available without resorting to PowerShell. The following is OS dependent (Windows 8 / Serve...