Search found 25 matches

by Xboxer
28 Feb 2015 18:58
Forum: DOS Batch Forum
Topic: Need help with script to retrieve wifi dns servers in win7
Replies: 10
Views: 9348

Re: Need help with script to retrieve wifi dns servers in wi

Thanks for the help, all is working well now. :wink:
by Xboxer
28 Feb 2015 17:29
Forum: DOS Batch Forum
Topic: Need help with script to retrieve wifi dns servers in win7
Replies: 10
Views: 9348

Re: Need help with script to retrieve wifi dns servers in wi

Foxi, I stand corrected I did a typo and your suggestion of removing the skip will now work. so thank your for that. Compo, I like how you think, I was also thinking of adding the server name along with the IP and yours will do that. If possible tho can you have the info set to a variable as I will ...
by Xboxer
28 Feb 2015 06:46
Forum: DOS Batch Forum
Topic: Need help with script to retrieve wifi dns servers in win7
Replies: 10
Views: 9348

Re: Need help with script to retrieve wifi dns servers in wi

Taking out the Skip=1 is one way to solve this. Thanks for your suggestion but I have already tried that and get the same results, found this wmic command that outputs the server name with dns ip at m and think this may work if it can be written correctly in a batch For loop. Thanks for the help, x...
by Xboxer
26 Feb 2015 21:30
Forum: DOS Batch Forum
Topic: Need help with script to retrieve wifi dns servers in win7
Replies: 10
Views: 9348

Re: Need help with script to retrieve wifi dns servers in wi

This command can give you the DNS server list. wmic NICCONFIG WHERE MACAddress!=NULL GET DefaultIPGateway,DNSServerSearchOrder foxidrive thanks for the wmic command, I used the below script but it reads out the top line and I only need the second line down. Do you have a solution for this? thanks a...
by Xboxer
25 Feb 2015 22:35
Forum: DOS Batch Forum
Topic: Need help with script to retrieve wifi dns servers in win7
Replies: 10
Views: 9348

Need help with script to retrieve wifi dns servers in win7

I need a script that can capture both the (primary + secondary) dns servers into a variable the batch script below captures Only the Primary and Name of the google dns but now I also need to add the secondary dns (8.8.4.4) Thanks for the help! @Echo Off :: Get IPv4 DNS IP shows primary as 8.8.8.8 Fo...
by Xboxer
06 Feb 2015 05:52
Forum: DOS Batch Forum
Topic: Need way to set Wallpaper variable??
Replies: 3
Views: 5688

Re: Need way to set Wallpaper variable??

I got it running from a batch file now but the powershell script also does the trick as well. Thanks for your help..xboxer In Windows XP and earlier, you used to be able to refresh the desktop wallpaper with a rundll32 invocation of a user32.dll function. Not so since Vista. You'll probably have to ...
by Xboxer
05 Feb 2015 06:27
Forum: DOS Batch Forum
Topic: Need way to set Wallpaper variable??
Replies: 3
Views: 5688

Need way to set Wallpaper variable??

Edit: I think I have it figured out now, If not I will update my post
xboxer
by Xboxer
04 Jan 2015 15:00
Forum: DOS Batch Forum
Topic: (SOLVED)-Nslookup and Non-authoritative answer
Replies: 4
Views: 8270

Re: Nslookup and Non-authoritative answer

Opps forgot bout the caret, This for statement now supresses the popup message and outputs correctly. Thanks for the hint, Xboxer For /F "Tokens=2 Delims=:" %%B In ('Echo quit^|Nslookup^|Find "Server"') Do Set HostName=%%B Must Run AS ADMIN.. For /F "Usebackq Tokens=2" ...
by Xboxer
04 Jan 2015 12:50
Forum: DOS Batch Forum
Topic: (SOLVED)-Nslookup and Non-authoritative answer
Replies: 4
Views: 8270

Re: Nslookup and Non-authoritative answer

Thanks Squashman your commandline works but when I put it in my For /F statement it just flashes and does not work. :(

Code: Select all

For /F "Usebackq Tokens=2" %%B In (`nslookup yahoo.com 2>nul |find "Server"`) Do Set HostName=%%B
Echo. %HostName%
Pause>Nul
by Xboxer
03 Jan 2015 20:48
Forum: DOS Batch Forum
Topic: (SOLVED)-Nslookup and Non-authoritative answer
Replies: 4
Views: 8270

(SOLVED)-Nslookup and Non-authoritative answer

When using this below script with Nslookup it reads the host correctly but also outputs the message "Non-authoritative answer:" as well. Anyway to nul out this message? Thanks for the help, Xboxer @Echo Off Set "Domain=Yahoo.com." IPConfig /Flushdns >Nul 2>&1 :: ISP HOST NAME...
by Xboxer
18 Dec 2014 20:59
Forum: DOS Batch Forum
Topic: .bat run as admin but I need logon user
Replies: 33
Views: 27134

Re: .bat run as admin but I need logon user

Ok, thanks it's will halpful in the future. But now important for me is open second bat as admin in such a manner that the first wait for second finish. You can open second bat as admin (elevated permissions) with this power shell script added to your .bat xbox (NET FILE||(powershell -command Start...
by Xboxer
18 Dec 2014 17:38
Forum: DOS Batch Forum
Topic: (SOLVED)-Help with DateTime Machine Restart batch
Replies: 5
Views: 4812

Re: Help with DateTime Machine Restart batch

Thanks for taking the time and explaining things Foxidrive! also discovered by using part of your script with the net user command that I can do the same. xbox @Echo Off SetLocal For /F "Tokens=2* " %%A In ('Net User %UserName%^|Findstr /B /C:"Last logon"') Do Set "LastLogon...
by Xboxer
17 Dec 2014 23:08
Forum: DOS Batch Forum
Topic: (SOLVED)-Help with DateTime Machine Restart batch
Replies: 5
Views: 4812

Re: Help with DateTime Machine Restart batch

Thanks for the help and quick response guys! Both solutions work with either Windows 7 or 8.1, this is one of the better forums on the net as far as being responsive and giving correct solutions, way to go guys.. P.S. Foxidrive just so I can better understand how come your solution worked could you ...
by Xboxer
17 Dec 2014 03:17
Forum: DOS Batch Forum
Topic: (SOLVED)-Help with DateTime Machine Restart batch
Replies: 5
Views: 4812

(SOLVED)-Help with DateTime Machine Restart batch

Trying to retrieve the Date and Time when local machine was re-started from the Statistics command (net statistics Workstation) Here is what I have so far, but it only gives out my current time. Thanks for the help. xbox ps: also found this batch here which looks promising but not working as well. m...