topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday November 12, 2025, 5:19 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 72 73 74 75 76 [77] 78 79 80 81 82 ... 225next
1901
Possibly Powershell?

Remove Invalid Characters from File Names

Though the problem remains of how to get the file from the filesystem before fixing it.
1902
Living Room / Re: block private numbers from leaving voicemail?
« Last post by 4wd on May 07, 2015, 04:02 AM »
are you telling us that even if you block this number, they can still leave a voicemail?

Private numbers have number forwarding turned off, you don't know what number is calling - you just get "Private number" as the identification.

The only way would be to ask your service provider to see what they can  do.
1903
General Software Discussion / Re: Help with Windows batch script
« Last post by 4wd on May 06, 2015, 04:37 AM »
@Ath: I was hoping you'd show us a one line Powershell script.

 :P

Good idea the per server user list.  :Thmbsup:
1904
General Software Discussion / Re: Help with Windows batch script
« Last post by 4wd on May 06, 2015, 02:36 AM »
Seemed to work OK with the example output you gave above, (edited to test various cases), but I couldn't test it listing output from servers, etc.

Create a file in the same directory as the command file called validusers.txt and enter each user, one per line.

Remove the echo. in front of the LOGOFF command if the output looks OK.

Code: Text [Select]
  1. @echo off
  2. SET serverlist=APPLE BANANA CHERRY
  3. SET userlist=.\validusers.txt
  4. SET tempfile=.\quser.txt
  5. for %%s in (%serverlist%) do (
  6.   QUERY USER /server:%%s >%tempfile%
  7.   for /f "skip=1 tokens=1,2,3,4,5,6,7,8" %%a in (%tempfile%) do (
  8. rem If it's a remote session then %%h will not be empty
  9.     if "%%~h" NEQ "" call :Logoff %%a %%b %%c %%d %%s
  10.   )
  11. )
  12. goto :End
  13.  
  14. :Logoff
  15. findstr /I ^%1$ %userlist% >NUL
  16.   if %ERRORLEVEL% NEQ 0 (
  17.     echo.Logging off User: %1, Session: %2, Status: %4
  18.     echo.LOGOFF %2 /server:%5
  19.   ) else (
  20.     echo.Ignored user %1
  21.   )
  22. goto :EOF
  23.  
  24. :End

Example output, (as is, using a modified QUSER output):
Code: Text [Select]
  1. Logging off User: wertala, Session: rdp-tcp#2, Status: Disc
  2. LOGOFF rdp-tcp#2 /server:8x8x64
  3. Ignored user trowe801
  4. Ignored user administrator

So if nothing else, the :Logoff subroutine will maybe give you some ideas.

QUSER test output used
Code: Text [Select]
  1. USERNAME              SESSIONNAME        ID  STATE   IDLE TIME  LOGON TIME
  2.  ablebz                                    2  Disc         4:25  5/5/2015 5:33 AM
  3.  wertala               rdp-tcp#2           4  Disc         2:57  5/5/2015 10:21 AM
  4.  trowe801              rdp-tcp#40          7  Active       5:18  5/5/2015 10:49 AM
  5.  administrator         rdp-tcp#1           8  Active       4:17  5/5/2015 3:18 PM


validuser.txt used
administrator
yankee
zebra
trowe801

1905
General Software Discussion / Re: Help with Windows batch script
« Last post by 4wd on May 06, 2015, 12:52 AM »
Thanks for the example output, forgot about having more than one user logged in since I only have single user machines on a LAN to play with - so yeah, my example only dealt with that scenario so not having a session specified in the LOGOFF command is kind of limiting :)

I might have a play with your output to see what I can come up with.
1906
General Software Discussion / Re: moving data from desktop to laptop
« Last post by 4wd on May 05, 2015, 09:31 PM »
If they're Gb ports, (or even if only one is), more than likely they'll be Auto-MDI/X in which case you can use x-over or non x-over cables.
1907
General Software Discussion / Re: email client and a special feature
« Last post by 4wd on May 05, 2015, 09:11 PM »
outlook.exe /select foldername
thunderbird.exe -mail mailbox://[email protected]/foldername
Alpine -f foldername

Aside from that:
First you should make more clear what you want to achieve, as it's totally unclear to me :huh:

What he said!
1908
General Software Discussion / Re: Help with Windows batch script
« Last post by 4wd on May 05, 2015, 08:27 PM »
Bearing in mind I haven't got a Domain setup to test this on:

I get the following return from QUERY USER /server:8x8x64  (8x8x64 is localhost):

Code: Text [Select]
  1. USERNAME      SESSIONNAME       ID   STATE   IDLE TIME      LOGON TIME
  2.  4wd          console            1   Active      none       6/05/2015 10:31

A multi-line return, you seem to be interested in only the first three tokens returned, which would be: USERNAME, SESSIONNAME, ID

If it's a different for a Domain server, can you post an example?

Otherwise, here's a short version that might work, (no output regarding who's logged on/off - but you should be able to add it under the IF statement by parsing the text file for the info):

Code: Text [Select]
  1. SET serverlist=APPLE BANANA CHERRY
  2. SET userlist=administrator zebra yankee
  3. SET tempfile=%TEMP%\quser.txt
  4. FOR %%s in (%serverlist%) DO (
  5.   QUERY USER /server:%%s >%tempfile%
  6.   FOR %%u in (%userlist%) DO (
  7.     FIND /C /I %%u %tempfile%
  8.     IF %ERRORLEVEL% NEQ 0 LOGOFF /server:%%s
  9.     )
  10.   )


Regarding your command file:
'QUERY USER /server:%%s^"'  - seems to escaping a single quotation mark, there's no matching quote, although quotes shouldn't be needed anyway since there's no spaces in any of the arguments.

While it runs, it could be written as:

FOR /f "tokens=1,2,3 usebackq" %%a IN (`QUERY USER /server:%%s`) DO (
1910
Living Room / Re: Kickstarter Highlight: Onion Omega
« Last post by 4wd on May 04, 2015, 07:53 PM »
It's cheaper for the Onion+Dock+OLED than it is for the MicroView+Dock, and more capable.

Crap, there goes more money I could use elsewhere ... curse you wraith!
1911
Thanks!  Anything quicker than 6 months beats my response time. ;)

Well, I guess I didn't make it before the six months time limit ... I added the option to wait for the called program to exit then completely forgot about posting it  :-[

Oh well, happens when you get older  ;D

Try this version, there's an option added to the .ini file called Wait, set it to True or False depending on whether you want to have BlankIt wait for the process it calls to exit, before exiting itself.

Attachment removed.
1912
One word: Thermite.  :tellme:

I suggested that but the hard part is the acquisition of the Al particles which would either involve a lot of grinding/filing or finding some paint supply that would be willing to sell it.

The PTB here go a long way to restrict our fun.
1913
Hmm... given that... I do still have a few drives that I was going to give to 4wd, but he lives a ways away from here, and probably won't be able to make it over before we leave...

Sorry about that ... and remember, you said you'd leave some kangaroo behind when you go.  :P

EDIT: Drat. Looks like they have those hex-star screws that I don't have a driver for. :(

Use an allen key, or a small flat blade screwdriver, (a tap with a hammer can assist in resizing the "slot" in the screw ;) ).
1914
Code: Text [Select]
  1. rem Check Internet connection, if not found loops every 30 seconds
  2. rem Adapted from:
  3. rem http://stackoverflow.com/questions/6357515/batch-files-using-ping-to-test-network-connectivity
  4. @echo off
  5. set site=www.google.com
  6. :loop
  7. ping www.google.com -n 1 -w 5000 > nul
  8. if errorlevel 1 (
  9.   ping -n 30 127.0.0.1 > nul
  10.   goto loop
  11.   )
  12. elseif (
  13.   start http://%site%
  14.   )

FYI
1915
Living Room / Re: Show us the View Outside Your Window
« Last post by 4wd on May 03, 2015, 10:44 PM »
Back when we had the lunar eclipse in April, taken with my aging Canon A720is at full magnification, (optical + digital):

~450kB
20150404-233906.JPG

I wish I'd had my new camera, Olympus SH-60:

~3.5MB
20150501-185048.JPG

Both taken handheld.
1916
Living Room / Re: What books are you reading?
« Last post by 4wd on May 02, 2015, 03:34 AM »
Continuing my L. P. Daviesw trend from the movie thread:

The White Room
Dimension A
The Land of Leys
Adventure Holidays, Ltd

All available for free via the Open Library, although The White Room was seriously munged in some places by the OCR process.
1917
Living Room / Re: Movies or films you've seen lately
« Last post by 4wd on May 02, 2015, 03:28 AM »
The Groundstar Conspiracy and Project X both based on the novels of L. P. Daviesw.

Both are based on the loss of identity, (in one form or another), of the main characters.

MV5BOTAyMjU5ODg3MV5BMl5BanBnXkFtZTcwOTM1MTgxMQ@@._V1_SY317_CR5,0,214,317_AL_.jpg MV5BMjIwNzgzMDcwMV5BMl5BanBnXkFtZTgwMTIxODk1MDE@._V1_SY317_CR1,0,214,317_AL_.jpg
1918
Announce Your Software/Service/Product / Re: Self Script
« Last post by 4wd on May 02, 2015, 02:42 AM »
I'm sure you could have mentioned VDSWorld somewhere Chris  :)
1919
More likely the dictionary meaning:

1
  • :  to cry like a calf or sheep :  bleat
2
  • a :  to make a raucous noise
  • b :  blab
transitive verb
  • :  to utter loudly or foolishly :  blurt
  • — blat noun
Examples of BLAT

    <blatted an obscene expletive before biting the dust>

Origin of BLAT
perhaps alteration of bleat
First Known Use: 1846
Related to BLAT

Synonyms
    exclaim, blurt (out), bolt, cry (out), ejaculate

Or I guess I could go look at the history  :-\

History of Blat

Who wrote Blat?

    Pedro Mendes & Mark Neal until October 1998
    Tim Charron & Gilles Vollant after October 1998

Where did the name Blat come from??

``NO real reason for calling it blat... actually I wanted to call it Blat mainly because Pedro thought it was a ridiculous name. And then because we could say things like 'I'm just going to blat off a quick email to ...' etc...''

--Mark Neal
1920
General Software Discussion / Re: Chrome Portable in a RamDisk = decadence?
« Last post by 4wd on April 29, 2015, 09:48 PM »
K-Meleon is still around, v75RC02 as of 29/03/2015 - quite a capable browser.
1921
Living Room / Re: Matchstick - A streaming stick using Firefox OS [Kickstarter]
« Last post by 4wd on April 29, 2015, 12:16 AM »
Blog post about the latest firmware update:

This version is largely a maintenance release with fixes including memory leak, EMMC issue, and HDMI output display errors. We have also made numerous preparations in this version to get ready for the soon-to-be-announced release of AdHoc mode and Local Play mode. Stay tuned !

As one comment mentioned:
Hey devs - it's great you released this update, but so you know, this update is only relevant to the 500 dev units you already shipped. The other 24,021 final units aren't given a single mention and it comes across a little teasing/harsh to literally 98% of your audience in these updates. In the future I'd recommend you try to give some sort of update to 98% of your audience that's patiently waiting, in addition to the 2% of dev units already shipped. :)

Still twiddling my thumbs.
1922
FWIW, the command line utility Blat is able to create and send HTML emails with embedded images.

Just create your HTML email source using <img src="cid:image-name"> tags and then use -embed to attach the images.

eg.
Code: Text [Select]
  1. blat.exe -to [email protected] -subject "Embedded images" -bodyF "test_email.html" -html -embed "Top.jpg","Middle.png","Footer.png"

SMTP server info, (missing in above), can be specified in command line or saved to registry so it need not be entered every time.

Only downside is Blat can't handle secure server connection but you could get around that by the extra step of using stunnel.
1923
Yeah, found that one and was going to use it, (my mistake I was going to use this one) ... however, unfortunately Outlook is incredibly anal when it comes to displaying the resulting email sent via the above method.

Whereas, Thunderbird is a bit more flexible and has no problem displaying it inline and hyper-linked, Outlook requires that the image be attached and that you use Content-Dispositionw structure to display it inline correctly ... it can't handle the inline encoded image data.

I really, really hate HTML emails.

But we have to cater for the LCD.

However, I think I've found a Powershell script that can send an email using XSL templates, so it should just be a matter of creating an HTML template, addressing, and specifying image attachments ... hopefully.

BTW, for Base64 encoding you can also use the Windows command certutil, (unfortunately it sticks a header and footer on the output).
1924
Living Room / Re: Interesting "stuff"
« Last post by 4wd on April 25, 2015, 07:37 PM »
(see attachment in previous post)
Apple Watch teardown reveals deactivated blood oxygen sensors

What they haven't said is that the sensors are really activated and when they detect that one of Apple's income providers are dangerously near asphyxiation not only will Apple be notified but an ambulance will be dispatched to ensure no potential loss of future revenue.
1925
If it includes a hyperlinked image like the email you sent me, then it's HTML body in it, and the test email I sent you is using a encoded PNG image, (even though I forgot to change the jpg to PNG in the code above, Thunderbird handled it OK - it knew what I meant :D ).

So to get this straight: the command file generates a PNG image that it inserted into an otherwise static content email?

Any chance you can send me a complete finished email and tell me which image changes?
Pages: prev1 ... 72 73 74 75 76 [77] 78 79 80 81 82 ... 225next