Secure use of passwords in batch files?


Recommended Posts

I have a series of batch files that run a robocopy backup to a TrueCrypt container on a remote machine.

1. backups.bat on local machine uses psexec to start backup_share.bat on the remote machine.

2. backup_share.bat mounts the TrueCrypt container and shares folders inside.

3. backups.bat runs robocopy.

4. backups.bat uses psexec to run backups_unmount.bat

5. backups_unmount.bat unmounts the TrueCrypt volume.

All of this requires my username and passwords in the batch files. Is there a more secure way to do this?

backups.bat

@echo off

D:\Programs\PsTools\psexec.exe -h \\DOWNSTAIRS -u username -p password D:\Locked\backups_share.bat

rem Run robocopy...
"D:\Programs\backups (robo).bat"

D:\Programs\PsTools\psexec.exe -h \\DOWNSTAIRS -u username -p password D:\Locked\backups_unmount.bat

PAUSE

backups_share.bat

@echo off

rem Mount True Crypt Volume
D:\TrueCrypt\TrueCrypt.exe /v D:\Locked\backups /l G /p password /q

rem Share folders
Net share share1$=G:\share1 /grant:username,FULL
Net share share2$=G:\share2 /grant:username,FULL

backups_unmount.bat

@echo off

rem Unmount Truecrypt volume
D:\TrueCrypt\TrueCrypt.exe /d /q

I found some info about encrypting passwords with PowerShell.

http://www.vistax64.com/powershell/104344-how-encrypt-paswd-file-used-batch.html

http://powershell.com/cs/media/p/248.aspx

PowerShell looks way more complicated than what I'm doing. I'm not sure how to begin.

There's always a chance someone will decode your complied exe, or sniff it out in memory.

They did this at work with VBS files and passwords inside, and people got the contents from extracting the exe's and using memory viewers.

I forgot to specify that you'd use encryption. Although I think by trying to have all this handled automatically he's biting off more than he can chew.

I just tested this program. The batch file doesn't appear to be visible in plain text, so your password should be "hidden".

http://www.battoexeconverter.com/

Encrypts batch file source to keep your code secret.

Users of your scripts cannot view/change your code after it is encrypted by the compiler. Any actions performed by the script can be kept secret.

If you want to take it a step further, this is a free EXE obfuscator which will make it more difficult to disassemble, although not impossible.

http://www.funradar.com/

I assume I need to change the lines in my batch files. Change .bat's to .exe's. Do I have to change anything else?

If you like ill work you up a basic autoit script, its format is similar to most scripting languages, easy to figure out

Let me know

I don't see any mention of security or encryption on the Autoit site.

Yeah well they spend more time developing it than they do on the web page :)

If you download AutoIT v3 and SciTE Editor also available on the AutoIT site, if you then compile a script with SciTe (Tools->Compile), you'll find the encryption stuff on the Obfuscate Tab....

post-282382-12797899386553.jpg

For example, heres a bare bones script ive hacked up in about 10 minutes (havent used AutoIT for a while), still adding error checking for the drive mapping, but ive tested the truecrypt mounting/unmounting

Also have no idea what your robocopy command line would be so thats blank, just a matter of the right RunAsWait line there...and error checking

Talking of error checking, TrueCrypt has pathetic exit code support, so it either fails on the command line or if you say try and mount an already mounted drive, you get a message box warning you of this, not a console exit code, so error checking is limited for TrueCrypt

Currently it runs at the command line and outputs errors or information to the console (command line), it can always pop up message boxes etc if you need. Ill post a finished version after i eat some dinner

If you go Tools->Compile on the first tab theres an option Create CUI instead of GUI.EXE, ticking this makes a console .exe, which is what i assumed you were looking for

Note: The opening section contains the compilation options (obfuscation etc already

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/cs=1 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

Partial quick script:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/cs=1 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****


;====TrueCrypt Settings =========
;$TC_Exe - path to truecrypt executable
$TC_Exe = "D:\TrueCrypt\TrueCrypt.exe"
;truecrypt container path
$TC_Path = "i:\test"
; truecrypt driveletter assign
$TC_DriveLetter = "x"
;truecrypt password
$TC_Password =  "test123"



;====Netowork Share Settings =========
;MapDriveMachineName - name of machine that has drive you wish to map, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$MapDriveMachineName = "computername"
;MapDrivePath1 - the 1st path on the machine you wish to share
$MapDrivePath1 = "\path"
;MapDrivePath2 - the 2nd path on the machine you wish to share
$MapDrivePath2 = "\path"
;NetworkDomain - name of domain that contains your user credentials, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$NetworkDomain = "domain"
;NetworkUsername - your network username
$NetworkUsername = "username"
;NetworkPassword - your network password
$NetworkPassword = "password"




;Mount True Crypt Volume
$TCMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /v " & $TC_Path & " /l" & $TC_DriveLetter & " /p " & $TC_Password)

If NOT @error Or $TCMount = 0 Then

	;write the success of truecrypt monting to the console
	ConsoleWrite(@CRLF & "Successfully mounted: "& $TC_Path & " to Drive: " & $TC_DriveLetter)

	; Map drives
	$Map1_Add = DriveMapAdd("y:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath1, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)
	$Map2_Add = DriveMapAdd("z:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath2, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)

	; Robocopy stuff


        ;UnMap Drives
	$Map1_Del = DriveMapDel("y:")
	$Map2_Del = DriveMapAdd("z:")

	;Un-Mount True Crypt Volume
	$TCUnMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /d " & $TC_DriveLetter)
	If @error Or $TCUnMount > 0 Then
		ConsoleWrite(@CRLF & ""Failed to unmount: "& $TC_Path & " from Drive " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCUnMount)
	EndIf
	ConsoleWrite(@CRLF & "Successfully unmounted: "& $TC_Path & " from Drive: " & $TC_DriveLetter)
	Exit

Else
	;write the failure of truecrypt mounting to the console
	ConsoleWrite("Failed to mount: "& $TC_Path & " to Drive: " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCMount)
EndIf

This is the more complete version, as opposed to your 3 files method, this is all in one

Cleaned up some typos in the original post

Probably needs some testing and tweaking, but i dont have a network here to test one....

Like i said, its quick and dirty and the network mapping isnt tested on my end

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/cs=1 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

; variables

;====TrueCrypt Settings =========
;$TC_Exe - path to truecrypt executable
$TC_Exe = "D:\TrueCrypt\TrueCrypt.exe"
;truecrypt container path
$TC_Path = "i:\test"
; truecrypt driveletter assign
$TC_DriveLetter = "x"
;truecrypt password
$TC_Password =  "test123"

;====Netowork Share Settings =========
;MapDriveMachineName - name of machine that has drive you wish to map, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$MapDriveMachineName = "computername"
;MapDrivePath1 - the 1st path on the machine you wish to share
$MapDrivePath1 = "\path"
;MapDrivePath2 - the 2nd path on the machine you wish to share
$MapDrivePath2 = "\path"
;NetworkDomain - name of domain that contains your user credentials, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$NetworkDomain = "domain"
;NetworkUsername - your network username
$NetworkUsername = "username"
;NetworkPassword - your network password
$NetworkPassword = "password"

;====Robocopy Settings =========
;$RC_Path - path to robocopy
$RC_Path = "D:\Robocopy\robocopy.exe"
;$RC_Options - robocopy options
$RC_Options = "/e /copyall"
;$RC_Source - source path
$RC_Source = "D:\source"
;$RC_Destination - source path
$RC_Destination = "D:\destination"



; script start

;Mount True Crypt Volume
$TCMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /v " & $TC_Path & " /l" & $TC_DriveLetter & " /p " & $TC_Password)

If NOT @error Or $TCMount == 0 Then

	;write the success of truecrypt monting to the console
	ConsoleWrite(@CRLF & "Successfully mounted: "& $TC_Path & " to Drive: " & $TC_DriveLetter)

	; Map drives
	$Map1_Add = DriveMapAdd("y:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath1, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)
	If $Map1_Add == 1 Then
	Else
		ConsoleWrite("Failed to map network drive: " & $MapDrivePath1  & " the error returned is: " & @extended)
		Exit
	EndIf
	$Map2_Add = DriveMapAdd("z:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath2, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)
	If $Map2_Add == 1 Then
	Else
		ConsoleWrite("Failed to map network drive: " & $MapDrivePath2  & " the error returned is: " & @extended)
		Exit
	EndIf

	;Robocopy stuff
	$TCUnMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, $RC_Path & " " & $RC_Options & " " & $RC_Source & " " &$RC_Destination)
	If @error Then
		ConsoleWrite("Robocopy failed, the error returned is: " & @error)
		Exit
        Else
	EndIf

	;whack in a quick 2 second sleep
	Sleep(2000)

        ;UnMap Drives
	$Map1_Del = DriveMapDel("y:")
	$Map2_Del = DriveMapDel("z:")

	;Un-Mount True Crypt Volume
	$TCUnMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /d " & $TC_DriveLetter)
	If @error Or $TCUnMount > 0 Then
		ConsoleWrite(@CRLF & "Failed to unmount: "& $TC_Path & " from Drive " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCUnMount)
	EndIf
	ConsoleWrite(@CRLF & "Successfully unmounted: "& $TC_Path & " from Drive: " & $TC_DriveLetter)
	Exit

Else
	;write the failure of truecrypt mounting to the console
	ConsoleWrite("Failed to mount: "& $TC_Path & " to Drive: " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCMount)
EndIf

Due to the fact i cant edit the above posts, heres an even more complete version with robocopy error checking enabled

Apparently there are different thoughts on what exactly the exit codes for robocopy are, ive used what MS says...

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/cs=1 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

; variables

;====TrueCrypt Settings =========
;$TC_Exe - path to truecrypt executable
$TC_Exe = "D:\TrueCrypt\TrueCrypt.exe"
;truecrypt container path
$TC_Path = "i:\test"
; truecrypt driveletter assign
$TC_DriveLetter = "x"
;truecrypt password
$TC_Password =  "test123"

;====Netowork Share Settings =========
;MapDriveMachineName - name of machine that has drive you wish to map, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$MapDriveMachineName = "computername"
;MapDrivePath1 - the 1st path on the machine you wish to share
$MapDrivePath1 = "\path"
;MapDrivePath2 - the 2nd path on the machine you wish to share
$MapDrivePath2 = "\path"
;NetworkDomain - name of domain that contains your user credentials, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$NetworkDomain = "domain"
;NetworkUsername - your network username
$NetworkUsername = "username"
;NetworkPassword - your network password
$NetworkPassword = "password"

;====Robocopy Settings =========
;$RC_Path - path to robocopy
$RC_Path = "D:\Robocopy\robocopy.exe"
;$RC_Options - robocopy options
$RC_Options = "/e /copyall"
;$RC_Source - source path
$RC_Source = "D:\source"
;$RC_Destination - source path
$RC_Destination = "D:\destination"



; script start

;Mount True Crypt Volume
$TCMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /v " & $TC_Path & " /l" & $TC_DriveLetter & " /p " & $TC_Password)

If NOT @error Or $TCMount == 0 Then

	;write the success of truecrypt monting to the console
	ConsoleWrite(@CRLF & "Successfully mounted: "& $TC_Path & " to Drive: " & $TC_DriveLetter)

	; Map drives
	$Map1_Add = DriveMapAdd("y:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath1, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)
	If $Map1_Add == 1 Then
		ConsoleWrite("Successfully mapped network drive: " & $MapDrivePath1)
		SetError(0)
	Else
		ConsoleWrite("Failed to map network drive: " & $MapDrivePath1  & " the error returned is: " & @extended)
		Exit
	EndIf

	$Map2_Add = DriveMapAdd("z:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath2, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)
	If $Map2_Add == 1 Then
		ConsoleWrite("Successfully mapped network drive: " & $MapDrivePath2)
		SetError(0)
	Else
		ConsoleWrite("Failed to map network drive: " & $MapDrivePath2  & " the error returned is: " & @extended)
		Exit
	EndIf

	;Robocopy stuff
	$TCUnMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, $RC_Path & " " & $RC_Options & " " & $RC_Source & " " &$RC_Destination)
	;Write copy result to console
	Switch @error
		Case 0	
			ConsoleWrite("No files were copied. No failure was encountered. No files were mismatched. The files already exist in the destination directory; therefore, the copy operation was skipped.")
		Case 1	
			ConsoleWrite("All files were copied successfully.")
		Case 2	
			ConsoleWrite("There are some additional files in the destination directory that are not present in the source directory. No files were copied.")
		Case 3	
			ConsoleWrite("Some files were copied. Additional files were present. No failure was encountered.")
		Case 5	
			ConsoleWrite("Some files were copied. Some files were mismatched. No failure was encountered.")
		Case 6	
			ConsoleWrite("Additional files and mismatched files exist. No files were copied and no failures were encountered. This means that the files already exist in the destination directory.")
		Case 7	
			ConsoleWrite("Files were copied, a file mismatch was present, and additional files were present.")
	EndSwitch		


	;According to MS any error code greater than 8 means a robocopy failure
	If @error >= 8 Then
		ConsoleWrite("Robocopy failed, the error returned is: " & @error)
		Exit
        Else
	EndIf

	;whack in a quick 2 second sleep
	Sleep(2000)

        ;UnMap Drives
	$Map1_Del = DriveMapDel("y:")
	$Map2_Del = DriveMapDel("z:")

	;Un-Mount True Crypt Volume
	$TCUnMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /d " & $TC_DriveLetter)
	If @error Or $TCUnMount > 0 Then
		ConsoleWrite(@CRLF & "Failed to unmount: "& $TC_Path & " from Drive " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCUnMount)
	EndIf
	ConsoleWrite(@CRLF & "Successfully unmounted: "& $TC_Path & " from Drive: " & $TC_DriveLetter)
	Exit

Else
	;write the failure of truecrypt mounting to the console
	ConsoleWrite("Failed to mount: "& $TC_Path & " to Drive: " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCMount)
EndIf

Thanks. I don't understand all of that, but it should be a great learning experience and get me started with autoit.

I don't get the robocopy settings section. It seems like there is just one set of source and destination variables. Also, how would I go about adding more robocopy jobs?

Currently, in my robocopy.bat, I have lines like this:

C:\windows\system32\robocopy.exe "G:\Folder1" \\DOWNSTAIRS\Folder1$ /mir /zb /dcopy:T /copyall /xa:h > "D:\Locked\backups_log.txt"

I use the same options for each job. And I have each one append the log file.

And just to clarify, I'm not on a domain, so I put the name of my local machine for the $NetworkDomain, correct?

Thanks. I don't understand all of that, but it should be a great learning experience and get me started with autoit.

I don't get the robocopy settings section. It seems like there is just one set of source and destination variables. Also, how would I go about adding more robocopy jobs?

Currently, in my robocopy.bat, I have lines like this:

C:\windows\system32\robocopy.exe "G:\Folder1" \\DOWNSTAIRS\Folder1$ /mir /zb /dcopy:T /copyall /xa:h > "D:\Locked\backups_log.txt"

I use the same options for each job. And I have each one append the log file.

And just to clarify, I'm not on a domain, so I put the name of my local machine for the $NetworkDomain, correct?

If youre not on a domain, under AutoIT you can use @ComputerName instead of "domain" just remember to not enclose it in " "

Okay the quickest and most painless way to run multiple copies, as you say you have the same copy options for each job, would be to use an .ini file

Ini files, you may have seen, have a section heading, and then key abd value pairs

i.e.

[section heading]
key=value

So you could just use an .ini file i.e. robocopy.ini, use a section heading [copy] store the source as the key and the destination as the value

Then you just loop through the key/value pairs using the autoit command IniReadSection and apply those key(source) and value(destination) pairs which come out as a 2 dimensional array to the robocopy command line

This is how it is done in my example script:

New variable declared in robocopy section, this just sets the path to the ini file

$RC_Ini = "D:\TrueCrypt\Robocopy.ini"

Next we loop through the key/value pairs and send them through the previous robocopy routine i posted earlier, with modifications

	;Robocopy stuff
	$CopyLines = IniReadSection($RC_Ini, "Copy")
	If @error Then
		MsgBox(4096, "", "Error occurred, probably no INI file.")
	Else
		For $i = 1 To $CopyLines[0][0]
		$RoboCopy = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, $RC_Path & " " & $RC_Options & " " & $CopyLines[$i][0] & " " & $CopyLines[$i][1])
		;Write copy result to console
		Switch @error
			Case 0
				ConsoleWrite("No files were copied. No failure was encountered. No files were mismatched. The files already exist in the destination directory; therefore, the copy operation was skipped.")
			Case 1
				ConsoleWrite("All files were copied successfully.")
			Case 2
				ConsoleWrite("There are some additional files in the destination directory that are not present in the source directory. No files were copied.")
			Case 3
				ConsoleWrite("Some files were copied. Additional files were present. No failure was encountered.")
			Case 5
				ConsoleWrite("Some files were copied. Some files were mismatched. No failure was encountered.")
			Case 6
				ConsoleWrite("Additional files and mismatched files exist. No files were copied and no failures were encountered. This means that the files already exist in the destination directory.")
			Case 7
				ConsoleWrite("Files were copied, a file mismatch was present, and additional files were present.")
		EndSwitch
		;According to MS any error code greater than 8 means a robocopy failure
		If @error >= 8 Then
			ConsoleWrite("Robocopy failed, the error returned is: " & @error)
		Exit
		Else
		EndIf
		Next
	EndIf

The loop part:

For $i = 1 To $CopyLines[0][0]

$CopyLines as mentioned is a 2 dimensional array thats what the [0] [0] part is, in autoit array element 0, or [0] always the maximum number of array elements.

So if we have 4 key value pairs, the true value of $CopyFiles is [4][4]

And For $i = 1 To $CopyLines[0][0] will run 4 times, with $I increasing by 1 each time until it hits 4 and the robocopy command will execute using each new key/value pair...$CopyLines[$i][0] is the key, $CopyLines[$i][1] is the value

To help you understand the loop better,

Create a file named robocopy.ini and paste the following in it:

[Copy]
c:\temp=d:\temp
c:\windows=e:\windows
d:\programs=f:\programs
f:\test=g:\test2

Then you can run the following script snippet (changing the path to the ini file you just created of course) from within SciTE (Tools->Go):

Note: this is almost verbatim form the autoit help file, i just modified it for my purposes within the longer and above example scripts

$IniFile = "D:\TrueCrypt\Robocopy.ini"

$CopyLines = IniReadSection($IniFile, "Copy")
If @error Then
    MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
    For $i = 1 To $CopyLines[0][0]

        MsgBox(0, "Test", @CRLF & "CopyLine number: " & $i & "   Source: " & $CopyLines[$i][0] & "   Destination: " & $CopyLines[$i][1])
    Next
EndIf

Now the full revised script:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/cs=1 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

; variables

;====TrueCrypt Settings =========
;$TC_Exe - path to truecrypt executable
$TC_Exe = "D:\TrueCrypt\TrueCrypt.exe"
;truecrypt container path
$TC_Path = "i:\test"
; truecrypt driveletter assign
$TC_DriveLetter = "x"
;truecrypt password
$TC_Password =  "test123"

;====Netowork Share Settings =========
;MapDriveMachineName - name of machine that has drive you wish to map, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$MapDriveMachineName = "computername"
;MapDrivePath1 - the 1st path on the machine you wish to share
$MapDrivePath1 = "\path"
;MapDrivePath2 - the 2nd path on the machine you wish to share
$MapDrivePath2 = "\path"
;NetworkDomain - name of domain that contains your user credentials, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$NetworkDomain = "domain"
;NetworkUsername - your network username
$NetworkUsername = "username"
;NetworkPassword - your network password
$NetworkPassword = "password"

;====Robocopy Settings =========
;$RC_Path - path to robocopy
$RC_Path = "D:\Robocopy\robocopy.exe"
;$RC_Options - robocopy options
$RC_Options = "/e /copyall"
;$RC_Source - source path
$RC_Source = "D:\source"
;$RC_Destination - source path
$RC_Destination = "D:\destination"
;$RC_Ini -  a file containing multiple source and destination folders
; this file will have a heading of [Copy]
; then under heading a separate source=destination on its onw line for each copy job
; i.e.:
;
;[Copy]
;c:\temp=d:\temp
;c:\windows=e:\windows
;d:\programs=f:\programs
$RC_Ini = "D:\TrueCrypt\Robocopy.ini"




; script start

;Mount True Crypt Volume
$TCMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /v " & $TC_Path & " /l" & $TC_DriveLetter & " /p " & $TC_Password)

If NOT @error Or $TCMount == 0 Then

	;write the success of truecrypt monting to the console
	ConsoleWrite(@CRLF & "Successfully mounted: "& $TC_Path & " to Drive: " & $TC_DriveLetter)

	; Map drives
	$Map1_Add = DriveMapAdd("y:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath1, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)
	If $Map1_Add == 1 Then
		ConsoleWrite("Successfully mapped network drive: " & $MapDrivePath1)
		SetError(0)
	Else
		ConsoleWrite("Failed to map network drive: " & $MapDrivePath1  & " the error returned is: " & @extended)
		Exit
	EndIf

	$Map2_Add = DriveMapAdd("z:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath2, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)
	If $Map2_Add == 1 Then
		ConsoleWrite("Successfully mapped network drive: " & $MapDrivePath2)
		SetError(0)
	Else
		ConsoleWrite("Failed to map network drive: " & $MapDrivePath2  & " the error returned is: " & @extended)
		Exit
	EndIf

	;Robocopy stuff
	$CopyLines = IniReadSection($RC_Ini, "Copy")
	If @error Then
		MsgBox(4096, "", "Error occurred, probably no INI file.")
	Else
		For $i = 1 To $CopyLines[0][0]
		$RoboCopy = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, $RC_Path & " " & $RC_Options & " " & $CopyLines[$i][0] & " " & $CopyLines[$i][1])
		;Write copy result to console
		Switch @error
			Case 0
				ConsoleWrite("No files were copied. No failure was encountered. No files were mismatched. The files already exist in the destination directory; therefore, the copy operation was skipped.")
			Case 1
				ConsoleWrite("All files were copied successfully.")
			Case 2
				ConsoleWrite("There are some additional files in the destination directory that are not present in the source directory. No files were copied.")
			Case 3
				ConsoleWrite("Some files were copied. Additional files were present. No failure was encountered.")
			Case 5
				ConsoleWrite("Some files were copied. Some files were mismatched. No failure was encountered.")
			Case 6
				ConsoleWrite("Additional files and mismatched files exist. No files were copied and no failures were encountered. This means that the files already exist in the destination directory.")
			Case 7
				ConsoleWrite("Files were copied, a file mismatch was present, and additional files were present.")
		EndSwitch
		;According to MS any error code greater than 8 means a robocopy failure
		If @error >= 8 Then
			ConsoleWrite("Robocopy failed, the error returned is: " & @error)
		Exit
		Else
		EndIf
		Next
	EndIf

	;whack in a quick 2 second sleep
	Sleep(2000)

        ;UnMap Drives
	$Map1_Del = DriveMapDel("y:")
	$Map2_Del = DriveMapDel("z:")

	;Un-Mount True Crypt Volume
	$TCUnMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /d " & $TC_DriveLetter)
	If @error Or $TCUnMount > 0 Then
		ConsoleWrite(@CRLF & "Failed to unmount: "& $TC_Path & " from Drive " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCUnMount)
	EndIf
	ConsoleWrite(@CRLF & "Successfully unmounted: "& $TC_Path & " from Drive: " & $TC_DriveLetter)
	Exit

Else
	;write the failure of truecrypt mounting to the console
	ConsoleWrite("Failed to mount: "& $TC_Path & " to Drive: " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCMount)
EndIf

As before, this is a BASIC script, and there may be errors i havent seen with my tired eyes (eagle eyed viewers will note that each revision clears up typos in particular) and there may be ways in which functionality can be improved upon (This is a stripped down wham bam example of functions and program flow), im just too tired after a big day to give it any more attention tonight. Any questions, PM me, ill be back tomorrow.

Corrected 3 errors that i missed last night (in DriveMapAdd section, using == operators for numerics doesnt work, been a while since i programmed anything)

Fixed, sorry folks

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/cs=1 /cn=1 /cf=1 /cv=1 /sf=1 /sv=1
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

; variables

;====TrueCrypt Settings =========
;$TC_Exe - path to truecrypt executable
$TC_Exe = "D:\TrueCrypt\TrueCrypt.exe"
;truecrypt container path
$TC_Path = "i:\test"
; truecrypt driveletter assign
$TC_DriveLetter = "x"
;truecrypt password
$TC_Password =  "test123"

;====Netowork Share Settings =========
;MapDriveMachineName - name of machine that has drive you wish to map, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$MapDriveMachineName = "computername"
;MapDrivePath1 - the 1st path on the machine you wish to share
$MapDrivePath1 = "\path"
;MapDrivePath2 - the 2nd path on the machine you wish to share
$MapDrivePath2 = "\path"
;NetworkDomain - name of domain that contains your user credentials, if on same machine, then you can use @ComputerName , no quotations marks around this, its an autoit macro.
$NetworkDomain = "domain"
;NetworkUsername - your network username
$NetworkUsername = "username"
;NetworkPassword - your network password
$NetworkPassword = "password"

;====Robocopy Settings =========
;$RC_Path - path to robocopy
$RC_Path = "D:\Robocopy\robocopy.exe"
;$RC_Options - robocopy options
$RC_Options = "/e /copyall"
;$RC_Source - source path
$RC_Source = "D:\source"
;$RC_Destination - source path
$RC_Destination = "D:\destination"
;$RC_Ini -  a file containing multiple source and destination folders
; this file will have a heading of [Copy]
; then under heading a separate source=destination on its onw line for each copy job
; i.e.:
;
;[Copy]
;c:\temp=d:\temp
;c:\windows=e:\windows
;d:\programs=f:\programs
$RC_Ini = "D:\TrueCrypt\Robocopy.ini"




; script start

;Mount True Crypt Volume
$TCMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /v " & $TC_Path & " /l" & $TC_DriveLetter & " /p " & $TC_Password)

If NOT @error Or $TCMount = 0 Then

	;write the success of truecrypt monting to the console
	ConsoleWrite(@CRLF & "Successfully mounted: "& $TC_Path & " to Drive: " & $TC_DriveLetter)

	; Map drives
	$Map1_Add = DriveMapAdd("y:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath1, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)
	If $Map1_Add = 1 Then
		ConsoleWrite("Successfully mapped network drive: " & $MapDrivePath1)
		SetError(0)
	Else
		ConsoleWrite("Failed to map network drive: " & $MapDrivePath1  & " the error returned is: " & @extended)
		Exit
	EndIf

	$Map2_Add = DriveMapAdd("z:", "\\" & $MapDriveMachineName & "\" & $MapDrivePath2, 0, $NetworkDomain & "\" & $NetworkUsername, $NetworkPassword)
	If $Map2_Add = 1 Then
		ConsoleWrite("Successfully mapped network drive: " & $MapDrivePath2)
		SetError(0)
	Else
		ConsoleWrite("Failed to map network drive: " & $MapDrivePath2  & " the error returned is: " & @extended)
		Exit
	EndIf

	;Robocopy stuff
	$CopyLines = IniReadSection($RC_Ini, "Copy")
	If @error Then
		MsgBox(4096, "", "Error occurred, probably no INI file.")
	Else
		For $i = 1 To $CopyLines[0][0]
		$RoboCopy = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, $RC_Path & " " & $RC_Options & " " & $CopyLines[$i][0] & " " & $CopyLines[$i][1])
		;Write copy result to console
		Switch @error
			Case 0
				ConsoleWrite("No files were copied. No failure was encountered. No files were mismatched. The files already exist in the destination directory; therefore, the copy operation was skipped.")
			Case 1
				ConsoleWrite("All files were copied successfully.")
			Case 2
				ConsoleWrite("There are some additional files in the destination directory that are not present in the source directory. No files were copied.")
			Case 3
				ConsoleWrite("Some files were copied. Additional files were present. No failure was encountered.")
			Case 5
				ConsoleWrite("Some files were copied. Some files were mismatched. No failure was encountered.")
			Case 6
				ConsoleWrite("Additional files and mismatched files exist. No files were copied and no failures were encountered. This means that the files already exist in the destination directory.")
			Case 7
				ConsoleWrite("Files were copied, a file mismatch was present, and additional files were present.")
		EndSwitch
		;According to MS any error code greater than 8 means a robocopy failure
		If @error >= 8 Then
			ConsoleWrite("Robocopy failed, the error returned is: " & @error)
		Exit
		Else
		EndIf
		Next
	EndIf

	;whack in a quick 2 second sleep
	Sleep(2000)

        ;UnMap Drives
	$Map1_Del = DriveMapDel("y:")
	$Map2_Del = DriveMapDel("z:")

	;Un-Mount True Crypt Volume
	$TCUnMount = RunAsWait($NetworkUsername, $NetworkDomain, $NetworkPassword, 0, "D:\TrueCrypt\TrueCrypt.exe /q /d " & $TC_DriveLetter)
	If @error Or $TCUnMount > 0 Then
		ConsoleWrite(@CRLF & "Failed to unmount: "& $TC_Path & " from Drive " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCUnMount)
	EndIf
	ConsoleWrite(@CRLF & "Successfully unmounted: "& $TC_Path & " from Drive: " & $TC_DriveLetter)
	Exit

Else
	;write the failure of truecrypt mounting to the console
	ConsoleWrite("Failed to mount: "& $TC_Path & " to Drive: " & $TC_DriveLetter & @CRLF  & "ExitCode: " & @error & "TrueCrypt returned error: " & $TCMount)
EndIf

That's looking great. Thank you.

Is here a way to exclude folders in a job? Also, I think it would be better to have the robocopy options in the INI file so that when more jobs are added they can have different options.

Also, there's two lines that have "D:\TrueCrypt\TrueCrypt.exe" . Should that be in the script?

That's looking great. Thank you.

Is here a way to exclude folders in a job? Also, I think it would be better to have the robocopy options in the INI file so that when more jobs are added they can have different options.

Also, there's two lines that have "D:\TrueCrypt\TrueCrypt.exe" . Should that be in the script?

Well spotted, very tired here lol

I forgot to substitute those lines with $TC_Exe, ill post the (yet again) fixed script when i have answered your second question...

As for adding the ability to have different options for each job, well thats going to involve a bit of a rewrite....since you originally were going to keep the same options i did it the quick easy way, now we get to play with some more array functions, StringSplit time methinks...

Gimme a little while....

There's a robocopy option for excluding folders. /xd

robocopy.exe D:\Folder \\computername\Folder /mir /zb /dcopy:T /copyall /xd "D:\Folder\Downloads" /xa:h

I think it would be easier to make changes later if the robocopy options where stored in the INI file.

Heres how to do the robocopy options via ini file method in a quick test:

1) Change the format of the ini file

- Will use key as numerical increment so you can troubleshoot by line if theres an error, the script will tell you which line to look at

- Will add all 3 options (robocopy options, source, destination) as a value, split by commas ","

demo ini file (robocopy.ini for purpose of test):

[Copy]
1=/e /copyall,c:\temp,d:\temp
2=/mir,c:\windows,e:\windows
3=/e,d:\programs,f:\programs
4=/mir /e,f:\test,g:\test2

2) quick test script to show this in use, again can run without being compiled, just use Tools->Go in SciTe:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

#include <Array.au3>

$IniFile = "D:\TrueCrypt\Robocopy.ini"
;read iniffile section [Copy] and return the key/value pairs underneath into 2 dimensional array [0][0]
$CopyLines = IniReadSection($IniFile, "Copy")
If @error Then
	;if no ini file found or other error, show mesagebox
        MsgBox(4096, "", "Error occurred, probably no INI file.")
Else
	;otherwise if no error, continue on
	;set loop to run as many times as there are key/value pairs
        For $i = 1 To $CopyLines[0][0]
		;split value (containing ROBOCOPYOPTIONS,SOURCE,DESTINATION) into 3 seperate variables at the comma
		$CopyLinesSplit = StringSplit($CopyLines[$i][1], ",")
		;if there are not 3 values split by a comma then show error and move to the next value
		If $CopyLinesSplit[0] < 3 Then
		         MsgBox(0, "Test", "Missing value in Ini File, key number: " & $i & "   expecting Robocopy Options, Source, Destination. One is missing")
		Else
		         ;check for empty element in returned array, this would mean you had put a comma after say source but failed to put in a value destination
		         $CheckEmpty = _ArraySearch($CopyLinesSplit, "", 1)
		         ;if a blank value is NOT found, continue script, in this case @error is actually good :)
		         If @error Then
		                 ;set robocopy variable from the first element of $CopyLinesSplit array
		                 $RoboCopyOptions = $CopyLinesSplit[1]
		                 ;set source variable from the second element of $CopyLinesSplit array
		                 $CopySource = $CopyLinesSplit[2]
		                 ;set destination from the third element of $CopyLinesSplit array
		                 $CopyDestination = $CopyLinesSplit[3]
                                 MsgBox(0, "Test", "Ini file key number: " & $i &  "   RoboCopy Options: " & $RoboCopyOptions &  "   Source: " & $CopySource & "   Destination: " & $CopyDestination)
		        Else
			         ;if a blank value is found, display message box
			         MsgBox(0, "Test", "Missing value after comma in Ini File, key number: " & $i & "   expecting Robocopy Options, Source, Destination. One is missing after a comma")
		        EndIf
		EndIf
    Next
EndIf

There is also error checking in case you had an ini file line that went (missing a value after a comma):

2=/mir,c:\windows,

And also if you missed a comma totally, it will always check for 3 values, so the following would error:

3=/e,d:\programs

So try the following modified ini file contents with the script and youll see what i mean

[Copy]
1=/e /copyall,c:\temp,d:\temp
2=/mir,c:\windows,
3=/e,d:\programs
4=/mir /e,f:\test,g:\test2

Im adding this new stuff to the script and a bit of logging etc, and will post it soon...i should have started this today instead of last night after I'd had some sleep!

In case youre wondering what the delay is...im having a bit of a fight with robocopy on exit codes at the moment

All else is done, i have dug out a copy of robocopy and have the script doing multiple jobs with multiple options with errors/info output to both the console (commandline) and logging to a text file

The file copying is working fine on each job, just robocopy gives the wrong exit code at the moment, im having to find a definitive list of exit codes that work properly

should have this small hitch fixed soon

The only thing i cannot test in all this script is the drive mapping...

Heres a quick squiz at what you see both at the commandline and in the logfile....

Attempting to mount truecrypt volume:  D:\test  on drive letter:  z ....

Successfully mounted:  D:\test to Drive:  z

About to start Robocopy job number:  1
RoboCopy Options:  /e /copyall
Source Folder:  d:\temp
Destination Folder:  z:\test

No files were copied. No failure was encountered. No files were mismatched. The files already exist in the destination directory; therefore, the copy operation was skipped.

About to start Robocopy job number:  2
RoboCopy Options:  /mir
Source Folder:  d:\temp
Destination Folder:  z:\test2

No files were copied. No failure was encountered. No files were mismatched. The files already exist in the destination directory; therefore, the copy operation was skipped.

Successfully unmounted:  D:\test from Drive:  z

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • SKG Hand Massager with Heat OS500 hands on by Steven Parker I was offered the chance to test out the SKG Hand Massager with Heat OS500, and full disclosure, they let me keep it regardless of my findings. Anyway, I jumped at the chance due to my long hours sitting at my desk, mousing around. Apologies for the knife cut across the top of the box; that was my doing, being a bit too heavy-handed with opening up the outer packaging. First up, what's in the box: SKG Hand Massager with Heat OS500 1x Type-C charging cable User Manual 1-Year Warranty (card) In short, everything you need to get started. According to the official Amazon listing, here are the key features: Full-Hand Air Compression: OS500 wraps your fingers, palm, and wrist with multi-chamber air compression for a complete hand relaxation experience. The extended massage chamber helps cover more of the hand and wrist area than standard palm-only hand massagers Palm Kneading with 6 Modes & 6 Intensities: Built-in palm kneading rollers add a hands-on massage feel, while 6 preset modes and 6 pressure levels let you choose the comfort level that fits your day—from gentle relaxation to a firmer full-hand massage 3 Heat Levels with Cooling Fan: Choose from 104°F, 113°F or 122°F warmth to suit different seasons and comfort preferences. The built-in cooling fan helps reduce stuffiness during heated sessions, keeping your hand feeling fresh and comfortable Easy Visual Display & Smart Timer: The digital image display clearly shows massage area, mode, intensity, heat level, and remaining time at a glance. Select 10, 15, or 20-minute sessions for quick office breaks, evening relaxation, or everyday hand care Rechargeable, Cordless & Comfortable: A 3000mAh battery supports over 90 minutes of full-function use on a full charge, with convenient USB-C charging. The soft inner lining, smooth ABS/PU finish, and premium black-gold design make OS500 ideal for home, office, or gifting With all that out of the way, here are my own findings. I gave it a try on both left and right hands, and as you can maybe see from the above YouTube Short, (sorry for the shaky video), my whole hand fits in, but my wrist barely enters the Hand Massager. I was able to push through a bit more with my fingertips extending out the other end to get a bit of massaging on the start of my wrist. Usage For some reason, there is a strap that is very difficult to fasten to my wrist with one hand. I am not sure what function it has, and it isn't mentioned in the user manual. The only thing I could find was in the product images that claimed "wrist precision". Unlike the Bob and Brad Hand Massager, this device does not massage the wrist anyway, even though a "wrist mode" is mentioned, which must be for smaller hands than I have, as it is mainly intended for the hand and fingers. In addition, for its steeper price, there are no disposable gloves provided in the box, which is a bit of an issue considering the internal cover (which appears to be elasticated nylon) cannot be removed for washing; so you are left with only one choice: always thoroughly wash your hands before using it. I can imagine this thing getting a bit grimy after a period of use, and that is a bit of a shame. With that said, the buttons on the device, from left to right, do the following: Heat button: 3-level heat control at 104°F, 113°F, or 122°F Mode button: Auto mode Circular mode Soothing mode Relax mode Palm and fingers mode Palm and wrist mode Intensity button: from (First-time users) 15Ka, 25Ka, 35Ka, 45Ka, 55Ka, 60Ka (Intensive relief) Knead button: on or off (6 pressure levels) Power button: Long-press to turn on or off Cooling button: turn on or off the cooling fan Also, in the product imagery, it states there are 36 "custom modes," but nowhere is it listed what these modes are. I can only imagine that they mean a combination of all of the above settings in different intensity levels. The device itself seems to rely on a single "kneading" mechanism located at the palm area of the hand, which spins when in use, and the other massage features are mainly utilized through the air sacs, increasing and decreasing at various levels on the hand and fingers. I am not sure it offered too much relief for someone who is typing and operating a mouse for hours at a time; further testing may be required. It does feel nice, though. Finally, you may be wondering how this fits into the scope of a tech website? Well, let me tell you something: sometimes I sit for up to 15 hours working on Neowin, and although I take breaks in between, it takes a toll on my body. I think in the immediate absence of a partner to apply relief, a good massager like this Hand Massager can shed the strains of the day in just a couple of 15-minute bursts. On the official website, this has an MSRP of $99.99, but luckily for our readers, it is selling at $10 off for just $89.99 right now on Amazon. SKG Hand Massager with Heat OS500 for $89.99 (with $10 off coupon), $99.99 MSRP For me, this gets a thumbs hands(?) down. However, it could be improved by making it so that the protective covering could be removed and thrown into the washing machine, or get yourself some disposable gloves to use with it. As an Amazon Associate, we earn from qualifying purchases.
    • Thanks for the info, but I'm still not sure if I need this....
    • We check out the SKG PS700 Neck Massager by Steven Parker I was offered the chance to test out the SKG PS700 Neck Massager, and full disclosure, they let me keep it regardless of my findings. Anyway, I jumped at the chance due to my long hours sitting at my desk; I figured it could offer some neck pain relief. What's in the box: SKG PS700-2 Neck Massager Rechargeable Battery (inside massager) Type-C USB cable User Manual Quick Start guide 1-Year Warranty In short, everything you need to get started. According to the official listing, here are the key features: Biomimetic Kneading & High Torque Motor: Designed with innovative biomimetic kneading heads that perfectly simulate the touch of human hands. Powered by a high-torque motor, this massager delivers powerful and precise deep tissue relief to effectively target stiff neck muscles and release built-up tension Soothing Heat & Integrated Sound Relaxation: Experience the ultimate Relaxationation with our dual-action approach. The soothing heat function gently warms your neck, while the built-in sound Relaxation provides calming audio tracks, helping you achieve a state of mindfulness and mental tranquility during your physical massage Cordless Convenience & Travel-Ready & Father's Day Gifts: Crafted for maximum portability and ease of use. Its lightweight, cordless design allows you to enjoy a premium massage anywhere without the hassle of tangled wires-whether you're taking a quick break at your desk or winding down at home Versatile Relief for Home & Office: An essential wellness companion for office workers, gamers, frequent travelers, or anyone looking to integrate mindfulness into their daily routine. It seamlessly fits into your lifestyle, providing instant neck relief whenever and wherever you need it Safe & Premium Materials: Manufactured with high-quality, skin-friendly materials to ensure a safe and comfortable experience without irritation. SKG backs this device with dedicated customer service, making it a thoughtful tech-health gift for family and friends App & Bluetooth Music Control: Connect via Bluetooth to control your massage settings through the dedicated app and enjoy your favorite music during your massage session for a fully customizable and immersive relaxation experience Red Light Warmth Technology: Features advanced red light warmth technology that penetrates deep into neck muscles to enhance blood circulation and provide soothing comfort while relieving muscle tension and stiffness Design With all that out of the way, here are my own findings. SKG does not say what materials are used to make the neck massager. However, on the product website, it mentions "soft-touch silicone" with what looks like PU leather cushioning, with the rest being mostly made up of plastics. On the inside of the massager, there are two "biomimetic kneading heads" that are motorized for the different styles of massage, which are not actually listed at all in the paper user manual, but the standard included modes are: De-stress mode, Mediation mode, Relax mode, Shiatsu mode. The massager looks quite premium and is actually very comfortable to wear. This massager is small and light enough to go anywhere, as it doesn't get in the way of anything, so I was able to use it in the chair while writing this review. Unlike the back massager, SKG does not warn in the user guide not to use it for more than 30 minutes a day (or two 15-minute sessions). However, there is a long laundry list of important safeguards to consider before and during the use of the device, and it is warned that the neck massager is not waterproof. It also includes a 1,400mAh battery with a rated power of 14W and input of 5V, which is the standard for up to USB 3.0 power (although the Amperage is not mentioned at all). SKG does not say how long it takes to charge, but a quick calculation at 2A (if that is what it is) would mean it would take roughly 1.5 hrs to charge from empty. In any case, the light around the button changes from orange to green on a full charge. In addition, it is not possible to use the device while it is charging. On the right of the neck massager is the On/Off and modes button, which also acts as a joystick. You can operate all the modes directly from the power button, as well as the app, which I'll get into a bit later: Push up: Short press to adjust Heat levels On/Off button: long press Mode Switching: Short press (while in operation) ➕ Push left: increase Music volume ➖ push right: decrease Music volume Push down: Short-press to turn Music on or off The massager defaults to De-stress mode, and it is not stated anywhere if the neck massager has overheat protection. This time around, regarding heat, the only detail I could find is that it has "triple action soothing heat." The temperature stages are not listed anywhere in the paper manual, Amazon listing, or official website. The heat levels can be adjusted through the app or directly on the device using the joystick button. Usage There's also the SKG Health app, which makes using the massager far easier than feeling around for the button on the side of your neck. If the app is stopped, you are required to log in with a verification code over email, which I am not too pleased with, as this means it will only work that way for however long SKG decides to support it through said app. However, I was not able to get the app to connect to the OS500, which I have reported back to my contact. Bluetooth appeared to be working on the neck massager as it became available to pair with my phone, but the SKG app failed to discover it. Before I forget, there's also a switch next to the USB charging port to deactivate and activate the Voice Prompt, which, when enabled, audibly tells the user when switching intensities, modes, or connecting to the app and informs when the massages start and are completed. That said, on to my likes and dislikes, which are listed below. What I didn't like Unable to connect the Neck Massager to the app Use through the mobile app relies on continued support from SKG What I liked Can be used without the app Cordless use Light and comfortable to wear Heat is also quite comfortable Where to buy: According to the official website, this has an MSRP of $249.99, but is currently $50 (on Amazon). To sweeten the deal a bit more, there's also an in-page coupon that knocks a further $20 off the price. SKG PS700-2 Neck Massager for $179.99 on Amazon (was $199.99) Apply the in-page $20 off coupon for the final price of $179.99 Just like the back massager, this gets a confused thumbs up (due to the cost). However, I cannot rate it through app usage as it failed to connect. As an Amazon Associate, we earn from qualifying purchases.
    • This Samsung T7 external SSD deal lasts less than a day by Sayan Sen Recently we had covered some nice deals of internal NVMe SSDs which include the 4TB TeamGroup G50 for only $400, the WD_BLACK SN7100 2TB for just $243, as well as the Samsung 990 PRO 1TB for $370. If however you require an external SSD for portability and quick data transfers and have a budget of less than $200 the Samsung T7 1TB model is currently on a limited time deal at just $190, it's lowest price in nearly three months. The deal ends today so you better hurry if you need one (purchase link below). The T7 weighs in at just 72 grams meaning it should be fairly easy to carry around helping in the portability department. Via its USB 3.2 Gen 2 interface the T7 promises sequential read speeds of up to 1050 MB/s and writes of 1000 MB/s. It is also fairly robust with a drop protection of up to 2 meters, though bear in mind that this is not waterproof. For that you will have to choose the rugged T7 Shield. The technical specifications of the Samsung T7 1TB are given in the table below: Specification Value Model Code (1TB) MU-PC1T0T / MU-PC1T0H Interface USB 3.2 Gen 2 (10 Gbps) Dimensions (W × H × D) 85 × 57 × 8 mm Weight 72 g Sequential Read Speed Up to 1,050 MB/s Sequential Write Speed Up to 1,000 MB/s Drop Resistance Up to 2 m (6.6 ft) Encryption AES 256-bit hardware encryption Operating Temperature 0°C to 60°C Non-Operating Temperature -40°C to 85°C Humidity 5% to 95% (non-condensing) Shock Resistance 1,500 G, duration 0.5 ms, 3-axis (non-operating) Vibration Resistance 20–2,000 Hz, 20 G (non-operating) Get it at the link below: Samsung T7 Portable SSD, 1TB External Solid State Drive, MU-PC1T0T/AM, Gray: $189.98 (Sold and Shipped by Amazon US) Good to know This Amazon deal is U.S. specific, and not available in other regions unless specified. We only use first-party seller links (at the time of article publishing); ensure that you purchase from a first-party seller link only. Check out Today's Deals on Amazon | or our recent tech deals. Become a Prime member (for Students or SNAP) via Neowin Get Prime Access - Prime for half price (for qualifying Medicaid, EBT, SNAP) Subscribe to Prime Video, Audible Plus, Music Unlimited or Kindle Unlimited via Neowin As an Amazon Associate, we earn from qualifying purchases.
    • I just wish they would put more love into Virtual Desktops. There is just so much more they could do.
  • Recent Achievements

    • Dedicated
      Almohandis earned a badge
      Dedicated
    • Dedicated
      JuvenileDelinquent earned a badge
      Dedicated
    • First Post
      DrWankel earned a badge
      First Post
    • Reacting Well
      DrWankel earned a badge
      Reacting Well
    • Week One Done
      Supreme Spray LV earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      505
    2. 2
      +Edouard
      184
    3. 3
      PsYcHoKiLLa
      84
    4. 4
      Michael Scrip
      78
    5. 5
      Steven P.
      76
  • Tell a friend

    Love Neowin? Tell a friend!