MSG On Win 7 64bit

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

MSG On Win 7 64bit

Post by CyberCitizen » Fri Nov 29, 2013 3:14 am

Hey Guys,

Having an issue and haven't been able to work out the best way to resolve it.

I have had a working script for quite some time that I can use to message a user on a machine via the network. Need admin on both machines.

No issue there, the problem is relating to Win7 64bit.

You can use 127.0.0.1 as the hostname. I can do it in a command window but not via the /c switch. 32bit works fine. Any help to resolve this would be awesome.

Code: Select all

      WriteLn>%TEMP_DIR%MSGUtility.txt,,%DMSG%%CRLF%--%CRLF%From: %DFROM% - %USER_NAME%

      Let>RP_WAIT=1
      Let>RP_WINDOWMODE=0
      Let>RP_DISPLAYERROR=0
      Run>cmd /c REG ADD "\\%DENWRTOOLS.COM%\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v "AllowRemoteRPC" /t REG_DWORD /D 1 /F > "%TEMP_DIR%AllowRemoteRPC.txt"
      Run>cmd /c MSG /V /TIME:172800 /SERVER:%DENWRTOOLS.COM% * <"%TEMP_DIR%MSGUtility.txt" >"%TEMP_DIR%MSGResponse.txt"
      Run>cmd /c REG ADD "\\%DENWRTOOLS.COM%\HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v "AllowRemoteRPC" /t REG_DWORD /D 0 /F > "%TEMP_DIR%AllowRemoteRPC.txt"
      ReadFile>%TEMP_DIR%MSGResponse.txt,MSGSentResults
FIREFIGHTER

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Nov 29, 2013 10:09 am

Perhaps you need to run the 64 bit cmd.exe. Try changing your code to:

Run>%SYS_NATIVE%\cmd.exe /c ..... bla bla

This will work on BOTH x86 and x64 because SYS_NATIVE refers to the native system folder. Currently redirection will be causing your macro to open the 32 bit version of cmd.exe and I'm guessing the registry settings or commands you are accessing via CMD need to be native to the bitness.

Try it anyway.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Fri Nov 29, 2013 11:16 am

Thanks Marcus,

I will give it a try on Monday.

I thought I tried that but will try again.
FIREFIGHTER

User avatar
CyberCitizen
Automation Wizard
Posts: 724
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Mon Dec 02, 2013 1:01 am

Got this message when using SYSNative.

[Window Title]
C:\WINDOWS\Sysnative\cmd.exe

[Content]
C:\WINDOWS\Sysnative\cmd.exe
The specified path does not exist.

Check the path, and then try again.

[OK]

EDIT: Never Mind, My Fault. I Am Running Macro Scheduler Virtualised. This Was Captured In Windows XP, However The Machine I Am Doing The Writting On Is Win 7. It Was Trying To Redirect Based On What It Thinks Was An XP Install. I Will Need To Re-Capture, However Compiling And Running The Exe Is What I Was After And That Is Working Ok.
FIREFIGHTER

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts