SendKeys Not Working The Same On Every Computer

Apr 23, 2010

I write a program designed for interacting with an Android phone that is hooked up to a Windows machine. One of the tools in my program is a utility designed to help the user root their phone.Now in order to root it goes through a command line utility called adb which lets you access a terminal on the phone. It must then type commands in that terminal. Most processes that this program does can be done through a batch file, however rooting the phone isn't one of them. The reason being once it actually logs in to the phone's shell, it stops running commands because it just gets stuck on that line, waiting for it to finish. So despite being a little primitive I designed that part of my application to use sendkeys. So the way it should work is:

1) It launches powershell as an adminstrator

2) Types the following commands (I have abbreviated the number of commands it types for the sake of this board. There's actually about 20 lines total): [code]

For the people that have this happen to them, it's always the exact same thing. It's like it completely skips all letters until it gets to a special character. I have no clue what could be causing this. The only thing I have found was that sendkeys wasn't totally supported but that running it as administrator would fix that, which is why I now have it run as admin. But that didn't help. I also had some success by using powershell instead of cmd, but it's still failing for a small number of people.Any ideas what would be causing this? Every other part of the program works perfect except for this. I haven't found any common element between the people that it is failing on. They aren't running the same anti-virus or the same programs. I program and debug on Windows 7 64 bit, yet someone else can run it on the same OS and it won't type it out properly.

View 1 Replies


ADVERTISEMENT

VS 2008 - SendKeys Not Working The Same On Every Computer

Apr 23, 2010

VB 2008 Express. I write a program designed for interacting with an Android phone that is hooked up to a Windows machine. One of the tools in my program is a utility designed to assist the user root their phone. Now in order to root it goes through a command line utility called adb which lets you access a terminal on the phone. It must then type commands in that terminal. Most processes that this program does can be done through a batch file, however rooting the phone isn't one of them. The reason being once it actually logs in to the phone's shell, it stops running commands because it just gets stuck on that line, waiting for it to finish.

So despite being a little primitive I designed that part of my application to use sendkeys. So the way it should work is:
1) It launches powershell as an administrator
2) Types the following commands (I have abbreviated the number of commands it types for the sake of this board. There's actually about 20 lines total):

SendKeys.SendWait("mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system{ENTER}")
SendKeys.SendWait("cat /system/bin/sh > /system/bin/su{ENTER}")
SendKeys.SendWait("chmod 4755 /system/bin/su{ENTER}")
SendKeys.SendWait("flash_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img{ENTER}")

Now it seems that for 90% of users, this works perfectly fine. However for a small group of people, this is what actually gets typed in to the powershell window:
> /system/bin/su{ENTER}
_image recovery /sdcard/recovery-RA-heroc-v1.2.3.img{ENTER}

For the people that have this happen to them, it's always the exact same thing. It's like it completely skips all letters until it gets to a special character. I have no clue what could be causing this. The only thing I have found was that sendkeys wasn't totally supported but that running it as administrator would fix that, which is why I now have it run as admin. But that didn't work. I also had some success by using powershell instead of cmd, but it's still failing for a small number of people.

Every other part of the program works perfect except for this. I haven't found any common element between the people that it is failing on. They aren't running the same anti-virus or the same programs. I program and debug on Windows 7 64 bit, yet someone else can run it on the same OS and it won't type it out properly. Is there something better that I could be using instead of sendkeys?

View 2 Replies

SendKeys Not Working - SendKeys Is A Type And Cannot Be Used As An Expression

Jul 2, 2010

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
CheckBox1.Checked = True
While CheckBox1.Checked = True
SendKeys("{END}")
End While
End Sub

That is the code, the error is "SendKeys is a type and cannot be used as an expression."

View 1 Replies

.Net Sendkeys - My.Computer.Keyboard.SendKeys("{F4}", True)?

Dec 27, 2006

I have a VB.Net 2.0 application, on my form I am using a Component ONE PDF reader control.I am trying to send to this control a F4 keystoke to close the navigation panel when it opens the PDF file. It is not working or not accepting the sendkey.I put focus on the control first. Code below:

Me.PDF1.Focus()

Me.PDF1.Select()

My.Computer.Keyboard.SendKeys("{F4}", True)

I have tried different variations of the Sendkeys with no success.

View 4 Replies

Sendkeys Freezes The Computer?

Mar 30, 2011

I'm using a grid and the instructions SendKeys.Send("{end}") whenever I write a letter in a cell, so the cursor places at the end of the cell. It works when I write a letter, however when I write the symbol "/" it doesn't work, and when i get this instruction in the debugger, it freezes.

View 1 Replies

Sendkeys While Computer Locked?

Feb 26, 2007

Is there any way to send keyboard input commands when computer is locked to a particularwindow

View 2 Replies

SendKeys Not Working?

Jun 8, 2010

I'm using vb.net 2005 and trying to get a old vb 6 app upgraded that uses sendKeys. I'm using:

SendKeys.SendWait("%{TAB}")

which should be the proper text for Alt+Tab, anyone else having a similar problem or know of another way to get this to work?

View 5 Replies

Application Not Working With Sendkeys?

Apr 24, 2012

So I have a form with a textbox1 thats supposed to enter in a set of keywords and then ebay will give you the"Instant suggestions" in return, but when I have my textbox1.text send the text over to the ebay form, ebay will not return any suggestions, unless I use the sendkeys.send method. Well, I do not like the sendkeys.send method because it's way too buggy &only works under the right conditions.Here's a pic of google instant and ebay does the same thing. So here's what I'm trying to get ebay to do:Here's the code that I have:

Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")
For Each curElement As HtmlElement In theElementCollection

[code].....

View 11 Replies

SendKeys Working On Windows 7 But Not XP Pro?

Sep 10, 2010

I have an application that I want to load using the scheduler in windows. I am also wanting the "enter" key pressed when the app loads. Because you cannot use a batch file I tried using a vb app. It works great on two different windows 7 machines but not at all on the xp machines. The xp machines load the app but don't follow through with the sendkey.

Sidenote - I had to repeat the sendkey function in order to get this to work because I am not sure how to use the sendkeys.sendwait function. I tried and it never worked.

Dim ProcID As Integer
ProcID = Shell("C:Program FilesAdobeFlash Media Live Encoder 3.1FlashMediaLiveEncoder.exe")

[Code].....

View 2 Replies

Sendkeys On Backgroundworker Thread Not Working?

Mar 29, 2010

Well to simplify it, whenever I use sendkeys from a background thread it just doesn't work. I even created a textbox, button, and backgroundworker with the following code:

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code].....

View 4 Replies

VS 2008 Sendkeys Working With Vista With .Net V3.x Framework?

Mar 30, 2009

i've been looking for a solutions/alternatives to use sendkeys in Vista after reading many threads about the issue, i did see posts of alternatives, there was mentioning that SendKeys does work in Vista with .Net v3.x Framwork. (thread :"[RESOLVED] cant use the sendkeys function in vista " post # 14 ,with the following link

[Code]...

so before i download and install .Net v3.5 Framework (because the computer i am using is not mine, borrowed it from a freind)i wanted to ask , can anyone confirm that this is true,if i will install .Net v3.5 Framework on windows Vista then the SendKeys command will work as usual (as on windows XP)??p.s. here is a link explaining how to know which version of .Net framework is installed on the computer[URL]..

View 3 Replies

Taking Control Of Another Application With Sendkeys Or Windows API Is Not Working?

Nov 18, 2011

I have tried to control another application to automate a process we do 100 times a day. It is simple enough, a few key strokes is all but I have been foiled in all attempts

View 1 Replies

VS 2010 : Difference Between SendKeys.SendWait And SendKeys.Send?

Jul 28, 2009

What is the difference between SendKeys.SendWait and SendKeys.Send?Send obviously will just send they key immediately, but does SendWait actually wait for the message to be processed or does it also send it immediately?The function's name itself is just confusing. Which one should I use if I want to send keystrokes to a 3rd party app immediately, or is there no difference? To me, a few milliseconds is a big difference.

View 3 Replies

Application Working On One Computer But Not Another

Feb 8, 2010

Has this ever happened to anyone? It has happened to me and one of my customers in the past but I have no idea how he diagnosed it and it is happening with another one of my clients now. The application runs, but the HTTP requests do not. The application works 100% perfect on my own computer but not the customers. He has both the 1.1 and the 3.5 framework installed, and uses Vista (same as me). Can anyone shed some light on this situation because this is a huge huge huge problem that I would rather not have to worry about in the future with other clients.

View 6 Replies

Working From Multiple Computer?

Aug 17, 2009

VS 2008 express edition, OWC office spreadsheet 11 I am working from two computers, one in my campus and one in my home. I already make a short project with form and OWC spreadsheet in the userform. It works well in my campus and I want to continue in my home.After copying all directory of the project to my home computer, the project failed to load.

View 6 Replies

Working Into A Remote Computer?

Jun 27, 2011

I can make users to my own computer.....but i don't know how can i do this to a remote computer same way Here is my code:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
Dim proc As New Process
proc.StartInfo.FileName = "net.exe"

[code]....

1.A User is created in users account(control-panel>users account).......but i want to create only the users account in incoming connection(vpn incoming connection)

2.I want to do it in a remote pc>>for example a pc ,which ip is 113.120.34.54,user: administrator,password: 12345

can i do it same way that i followed to create user in my local PC?

View 3 Replies

Transparency Working On Development Computer Only?

Jan 6, 2009

I used a background with dark gray regions as transparent regions for my splash screenOn my development computer, it shows transparent regions, but on all other computers it's opaqueI even tried installing Windows XP in VMware on the development computer, and still it didn't work!

View 3 Replies

Computer Has Crashed A Few Times While I Was Last Working On Code?

Apr 5, 2012

I am working on an OpenGL Visual Basic 2010 Express project using Tao.dlls.My computer has crashed a few times while I was last working on my code.Since then There has been some side effects such as intelisense and autocomplete not working when I load the project, even after checking the options and settings for them.When I start a new project on the other hand the features work again.Also when this OpenGL code is run:

Code:
glutMotionFunc(AddressOf MouseMotionGUI)

I get:

BadImageFormatException unhandeld
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

This code was working fine before my computer crashed and probably corrupted some files.

View 6 Replies

Simple 'open Cd Tray' App Not Working One One Computer

Jul 4, 2010

I have a simple executor that when clicked, opens the CD tray.[code]On my computer it works fine but on another computer, it only opens the CD tray if there is no disk in it.[code]

View 5 Replies

Working Alternative That Can Use That Will Always Return Unique Identifier For Every Computer

Jan 14, 2009

In my [2005] application, I use the MacAddr / CpuId / DiskId of the computer to validate my licence using the WMI calls. The problem is we just can't thrust this feature because on a good percentage of the computers this feature is not installed properly or completely disabled.The users are not experienced, they are located in a remote location and I just don't feel like debugging their Windows installation every time they want to try my application.Is there a working alternative that I can use that will always return me a unique identifier for every computer which will always be available on 2000 / XP / Vista systems?

View 8 Replies

SendKeys Underlying API Or API Equivalent To SendKeys?

Dec 1, 2009

I'm looking for the underlying Win32 API call that the DotNET Framework invokes on a SendKeys.Send or .SendWait call, or a Win32 API Equivalent to SendKeys. I've already experimented with SetKeyboardState which seems like the way to go, except that it does not raise any kind of keyboard event that causes the set keystates to register with an active application or the OS (at least not until another key is pressed; for example I can meddle with the keyboardstate before events process on a natural keystroke, but I can't invoke a keystroke programmatically).

View 1 Replies

IDE :: VB 2008 Express: Program Runs On PC But Stops Working When Trying To Run .exe On Another Computer?

Jun 3, 2011

And here I am with a new problem in my program When I debug it everything works fine (the buttons, progressbars, pinger, spambot, When I compile it and run the Executable file, it works too.When I run the Executable file on another computer (tried on 4 different ones) the program stops working and
I get this error:

{$ exception. "Failed to create the form For more information, see Exception.InnerException error: File or assembly ." Microsoft.VisualBasic.PowerPacks, Version = 9.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a "or one of its dependencies not found. The system can not find the file specified .."} System.Exception {System.InvalidOperationException}

[Code]...

View 1 Replies

Access A Web Server To Download A File But My.computer.network.downloadfile Not Working

Dec 27, 2011

I'm trying to access a web server to download a file, but when I run the statement gives me the following WebException:

[Code]...

View 7 Replies

Sendkeys & Target - If The Target Of The Sendkeys Has Changed Between Sendings?

Aug 16, 2010

When using Sendkeys with vb.net, is it possible to tell if the target of the Sendkeys has changed between sendings?

View 1 Replies

IDE :: When Open A Visual Basics Program On Another Computer (Vista) It Says "IP Finder Stopped Working"

Jul 17, 2011

The program i made is an IP Finder. it uses MS WinSock, so i thought that would be the problem. I have already installed the powerpack and i got another program i made working

View 2 Replies

Sockets - Check That If Another Computer In The Network Send Some String Data To The Listener Computer?

Mar 19, 2012

i have a task to create a TCP Server (a program that is listening on its network card interfaces for incoming data stream).I have search on the internet and i found that i can use two methods : Socket or TCPListener class.I have created an example for Socket class, but i wondering how could i test it? I need to check that if another computer in the network send some string data to the listener computer , then this message should be displayed.Here is the example from microsoft that i am using for TCP Server using Socket:

Public Shared Sub Main()
' Data buffer for incoming data.
Dim data = nothingc[code]....

But it does not work because of the PORT setting.If in the TCP Server i have "Dim localEndPoint As New IPEndPoint(ipAddress, 0)" the client crashes, but if i change the port from any (0) to 11000 for example,the client works fine.Do you know why?

Later edit2:Maybe i should have started with this question:Which method is recommended for my scope?asynchronous or synchronous method ?

View 2 Replies

Developing A Computer Application Designed To Monitor The Network And CPU Statistics On A Computer?

Jan 29, 2009

I am developing a computer application designed to monitor the network and CPU statistics on a computer remotely. The monitored computer would have my program installed and the monitoring computer would display, in a form, the information being sent from the remote client.The application does not send any information regarding packets, user names, passwords, etc. It is solely meant for monitoring CPU performance and Network resources remotely.

What would be the best method to send this information over to my host machine?I am programing in Visual Studio 2008 on windows XP. The client machine is also XP. I know this sounds a little shady, but it is required for my little business (http://www.iquorum.net) to monitor what and when something happens on our machines when I and my employees are away.

View 2 Replies

VS 2005 : Dial A Computer From Another Computer Using Modem For Sending Files And Message?

Jul 11, 2009

I am trying to dial a computer from another computer using Modem for sending files and messge.Follwoing is the code done in dialing computer

Text1.Text = "Test string from App1 "
Number$ = InputBox$("Enter phone number:", "Number$")
If Number$ = "" Then Exit Sub
Temp$ = Status

[code].....

But after the dial tone, i am getting the exception "CTL_E_GETNOTSUPPORTED " at the line MSComm1.Output = Text1.Text?

View 6 Replies

Access The Data Coming To The Computer From The In-built Bluetooth Module Of A Computer On Windows Platform?

Feb 4, 2011

i have encountered a problem, i want to access the data coming to the computer from the in-built bluetooth module of a computer on windows platform, this data has been sent by a remote bluetooth module say a by an autonomous device (just like a bluetooth mouse connecting to the computer). The to be sent is in the form of numbers and i need these to manipulate on the computer.

View 6 Replies

VB - Desktop Computer With Cable Connection On Back Allows To Watch TV On Computer Using Windows Media Center

Jun 12, 2010

I have a desktop computer with a cable connection on the back that allows me to watch TV on the computer using Windows Media Center. I had the idea of writing a program that would access this feed and send it to another computer (laptop) via my network. That way I would be able to watch TV from anywhere that my network spans. I have no idea if this is possible or how I would even do it,

So I have three questions.
1: Is it possible?
2: How would I go about access the feed?
3: How would I send it over the network?

My original thought was doing it in Flash, but I'm not very good at Flash so I wanted to do it in VB.Net.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved