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


ADVERTISEMENT

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

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

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

.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

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

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

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

VS 2008 Computer Restarts And Mapped Drive Appears Under My Computer?

Mar 31, 2009

Problem:When my computer restarts my mapped drive appears under My Computer. When I try to use it from code I get errors. If I open the mapped drive by double clicking it, and then try the code, it works. What I discovered is that when my computer starts the status, using net use, is

[code]...

View 5 Replies

VS 2008 - Share Files From A Computer To A Computer That Are Connected In?

Dec 21, 2009

How do you share files from one computer to another that are connected in one wireless internet connection? I mean, it's possible using shared folders this means it could be possible in vb.net too..

View 1 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

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

VS 2008 How To Do 2 Sendkeys At Once

Jul 7, 2009

Ex: Alt button + i button.

View 2 Replies

VS 2008 SendKeys To Another App?

Dec 28, 2009

How would I use sendkeys to sendkeys to another app?

View 5 Replies

VS 2008 Sendkeys Alternative?

Nov 10, 2009

hey been looking around for an example of Sendmessege to send keys, but all you find is the basic notepad example, can anyone please show me the way to use Sendmessege to sendkeystrokes to any application (i have the hwnd)

View 3 Replies

VS 2008 Sendkeys CTRL+U?

Jun 24, 2009

anyone knows how to sendkeys CTRL+U

View 6 Replies

VS 2008 SendKeys Method()?

Dec 13, 2011

I have this to show you before i begin:

Dim User As String() = TextBox1.Text.Split("")
Dim Pass As String() = TextBox2.Text.Split("")
Dim CharC As String

[code]....

View 11 Replies







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