Search found 75 matches

by douglas.swehla
31 Aug 2016 15:28
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

Thanks Douglas! You're welcome, Steffen! Of course, and as always. I will work around using CHCP and update the script. . . . Of course /-C would solve it . . . On the other hand it's a simple way to see the thousand separator. Just so I understand, do you mean you're going to use CHCP to force a s...
by douglas.swehla
31 Aug 2016 13:35
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

The surprising result is that the thousands separator fails in the DIR output. I didn't even expect that it could be anything else than ',' or '.' But in the Russian output it actually is a 'non-breaking space' that appears as a 'ya' character in the editor window. I will work around using CHCP and...
by douglas.swehla
31 Aug 2016 13:29
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

All of you guys are very welcome to try it out and give a feedback I ran it on my work computer, while connected to the work network, and got this result: -------------------------------------------------------------------------------- Windows version : Microsoft Windows [Version 6.1.7601] Product ...
by douglas.swehla
31 Aug 2016 10:28
Forum: DOS Batch Forum
Topic: display title and pid of current window?
Replies: 9
Views: 26356

Re: display title and pid of current window?

I know that this topic lay dormant for a few years Rob Van Der Woude issued a challenge some years ago ( http://www.robvanderwoude.com/gettitle.php ), asking people to write a pure batch script that would get the title of the currently running window. I'm not sure how long ago, since the page isn't...
by douglas.swehla
26 Aug 2016 15:25
Forum: DOS Batch Forum
Topic: Menu question
Replies: 5
Views: 4600

Re: Menu question

is there anyway to return to the menu prompts WITHOUT using a GOTO label? I ask because scripts can become cluttered with many GOTO labels and look "bad". I know they are necessary but figured I'd ask. First, I agree with Squashman, and I'm glad to see you took his advice. For the benefit...
by douglas.swehla
26 Aug 2016 11:34
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

I never heard about something like that. If that is really is a third-party program which name has it? It's called Avecto Defendpoint. Here is a blurb from the support team describing it: In an on-going effort to strengthen the security of our ecosystem with respect to privileged access, Identity a...
by douglas.swehla
26 Aug 2016 11:03
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

Instead of "Administratoren" there should be "%adminGroupName%" (which contains localized version of "Administrators" ; all without doublequotes) I made that change when testing, and also substituted "Administrators" directly. Both had the same result: No Ins...
by douglas.swehla
25 Aug 2016 17:34
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

2>nul wmic path win32_groupuser where (GroupComponent="win32_Group.Name=\"%adminGroupName%\",Domain=\"%userDomain%\"" ^ AND PartComponent="Win32_UserAccount.Name=\"%userName%\",Domain=\"%userDomain%\"") penpen I tested your approach and it...
by douglas.swehla
25 Aug 2016 14:35
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

Thanks! Tried it at work and it returns the right results in no time I'm curious what Douglas' results will be using your approach. n Runs in under a second, with accurate results. That's nearly the same solution, i've given above (with a removed flaw, but a (probably slower) "for /F" ins...
by douglas.swehla
23 Aug 2016 19:50
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

@Douglas Basically this is what I included into the script for the moment. (The link can be found in the initial post.) set "LocalAdmin=Not found" for /f "tokens=1* delims==" %%i in ( 'wmic path Win32_Group WHERE "LocalAccount='TRUE' AND SID='S-1-5-32-544'" GET Name /v...
by douglas.swehla
18 Aug 2016 16:11
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

I'm not sure if the following is faster Not quite. It's querying the Win32_GroupUser class that isn't optimized. I decided to use WMIC path Win32_Group WHERE "LocalAccount='TRUE' AND SID='S-1-5-32-544'" to get the admin group name and try to find it in the output of NET USER %USERNAME% . ...
by douglas.swehla
15 Aug 2016 09:39
Forum: DOS Batch Forum
Topic: How to create broadband connection via cmd?
Replies: 1
Views: 2529

Re: How to create broadband connection via cmd?

What have you tried so far? If there is a script or command line you're working on, please post it.
by douglas.swehla
14 Aug 2016 12:14
Forum: DOS Batch Forum
Topic: Can anyone help me clean up this code?
Replies: 7
Views: 6812

Re: Can anyone help me clean up this code?

It uses Colous.exe, an external program to display colors in batch, but can be used instead of cls as well. Download for Colous.exe: http://www.mediafire.com/download/jzem4xtymkd/colous.exe Link to the guy who made Colous.exe: https://diamam.blogspot.de/2010/10/ya-llega-colous-v6.html Thanks for sh...
by douglas.swehla
14 Aug 2016 10:43
Forum: DOS Batch Forum
Topic: Can anyone help me clean up this code?
Replies: 7
Views: 6812

Re: Can anyone help me clean up this code?

(_osd_) wrote:I found a way to fix the flickering myself.


Please share your solution, and let us know how it compares to einstein1969's.
by douglas.swehla
13 Aug 2016 23:18
Forum: DOS Batch Forum
Topic: Creating a script to gather PC information - to assist those asking for help
Replies: 167
Views: 151260

Re: Creating a script to gather PC information - to assist those asking for help

set "localadmin=" wmic path Win32_Group WHERE "LocalAccount='TRUE' AND SID='S-1-5-32-544'" assoc /assocclass:Win32_GroupUser|>nul findstr /c:Name^=\"%username%\" && set "localadmin=1" if defined localadmin (echo Can obtain administrative elevation.) e...