0
0
I have a touch button in my laptop which I can configure what app it will open after touching it.
I edit a path to program in registry. When there is some .exe file (i.e. notepad.exe) everything works fine. But when I'm trying to put "rundll32.exe" with parameters to sleep windows it doesn't want to work. I put the following line:
rundll32.exe powrprof.dll,SetSuspendState Sleep
I checked another exe file with parameter"
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --incognito
And it is working. But how to run rundll32.exe with these parameters? In Command Prompt I put the above command after executing computer goes to standby mode so I assume the parameters are correct. The problem is how to execute this command from registry (by touching button). Maybe there's a special syntax for registry commands that I'm not aware of
it may be that it only supports POSIX compliant parameters like your chrome one, but my guess is that you need to adjust your quoting to account for parameters for your dll vs parameters for rundll32. – Frank Thomas – 2013-12-10T15:10:26.427
@FrankThomas Can you explain it with more details? I don't know what's your point. – Koboos – 2013-12-10T17:14:21.147
@Koboos - You should update your question with that information so my comment can be deleted. The next step is to create a working shortcut. Once you have that working we can go to the next step in trying to determine whats wrong with what you have currently. – Ramhound – 2013-12-10T17:53:41.553
@Ramhound I created shourtcut on desktop. On double-clicking, computer goes to stanby mode. I know there is a way to create batch file and point to this file in registry, but I want to know how to make this working without additional files. – Koboos – 2013-12-10T18:10:29.113
@Koboos - At this point you have a working shortcut. You also know the command works by running the shortcut. Create yourself a .bat file and instead of running Chrome run the .bat file. Since you don't want to do that, provide the full path to rundll32.exe, this should allow it to work. – Ramhound – 2013-12-10T18:56:30.280
Your tablet’s program requires a full path. Use
c:\windows\system32\rundll32.exe powrprof.dll,SetSuspendState Sleep
– Synetech – 2013-12-15T15:11:16.107@Synetech already tried giving the full path, but it is also not working. – Koboos – 2013-12-16T10:22:31.677
Did you try putting the command in quotes? That seems to be the only other obvious difference between the command that works and the one that doesn’t. Other than that, the only difference left is that
rundll32
is in the system directory but Chrome is not. Perhaps it’s a permissions issue… – Synetech – 2013-12-16T18:32:59.280@Synetech Yeah I tried every combination of quoting this command/path. None worked. Is there anything I can do with permissions? Giving access for Everyone for rundll32? – Koboos – 2013-12-17T14:48:50.580
You could, but first check if that’s even the problem. When you tried it manually from the command-prompt, was it an elevated prompt? If not, then you’ll need to find out what account the program that controls the button is running in; it may be a low-privilege account. Do you know what the process is? It will probably be something specific to your laptop’s make and/or model. – Synetech – 2013-12-17T15:00:05.520