Jump to content

"Using hdparm in limited user accounts" or "starting progs with adminrights before waking up from hibernation"


Recommended Posts

Guest PatrickMail@gmx.de
Posted

"Using hdparm in limited user accounts" or "starting progs with adminrights before waking up from hibernation"

 

Hi everybody,

 

I am using the programm hdparm to modify the settings of my HDD

(especially Advanced Power Management). This program works fine, but

has to be executed in each session. This is no problem, because it can

simply be but into a batch file and placed in the start-up folder.

 

However, I frequently use limited user accounts. Here, the command

does not work. It terminates with "hda: Permission denied". Is there

an option to let windows execute the command before I log into the

limited user account and thus to keep the option set while I work in

that account? I also have to mention that I usually use the hibernate

function, so actually, there is no real start-up process.

 

The situation is the following: When I am looged in as an admin and

start hdparm and then change into a limited account everything is fine

and the HDD option is set. When I then put the computer into

hibernation and then wake it up again next morning the setting is gone

and I have to switch to an admin account to make hdparm set the option

again.

 

Does anybody of you have an idea how I could solve this problem?

 

Greetings.

  • Replies 8
  • Created
  • Last Reply
Guest Pegasus \(MVP\)
Posted

Re: "Using hdparm in limited user accounts" or "starting progs with admin rights before waking up from hibernation"

 

Re: "Using hdparm in limited user accounts" or "starting progs with admin rights before waking up from hibernation"

 

 

<PatrickMail@gmx.de> wrote in message

news:859c16e3-c1de-4a4b-9d5c-dfa1697c2919@m36g2000hse.googlegroups.com...

> Hi everybody,

>

> I am using the programm hdparm to modify the settings of my HDD

> (especially Advanced Power Management). This program works fine, but

> has to be executed in each session. This is no problem, because it can

> simply be but into a batch file and placed in the start-up folder.

>

> However, I frequently use limited user accounts. Here, the command

> does not work. It terminates with "hda: Permission denied". Is there

> an option to let windows execute the command before I log into the

> limited user account and thus to keep the option set while I work in

> that account? I also have to mention that I usually use the hibernate

> function, so actually, there is no real start-up process.

>

> The situation is the following: When I am looged in as an admin and

> start hdparm and then change into a limited account everything is fine

> and the HDD option is set. When I then put the computer into

> hibernation and then wake it up again next morning the setting is gone

> and I have to switch to an admin account to make hdparm set the option

> again.

>

> Does anybody of you have an idea how I could solve this problem?

>

> Greetings.

 

Since this program affects the system, not the user session, you should

execute the command as part of your startup process. It would be

sufficient to schedule your batch file to run at boot time. Don't invoke

it as part of the logon process.

 

When returning from hibernation then you could use Hibernate Trigger

to invoke your batch file again:

http://www.desimonesystems.com/suspendtrigger/index.php

I haven't tried it myself - this is an educated guess.

Guest PatrickBrzoskaPB@googlemail.com
Posted

Re: "Using hdparm in limited user accounts" or "starting progs withadmin rights before waking up from hibernation"

 

Re: "Using hdparm in limited user accounts" or "starting progs withadmin rights before waking up from hibernation"

 

Hi, when I use Hibernate Trigger programs are not executed with admin

rights. It is just like starting the batch myself by clicking when

returning from hibernation to my limited account.

 

On 14 Jul., 22:42, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:

> <PatrickM...@gmx.de> wrote in message

>

> news:859c16e3-c1de-4a4b-9d5c-dfa1697c2919@m36g2000hse.googlegroups.com...

>

>

>

> > Hi everybody,

>

> > I am using the programm hdparm to modify the settings of my HDD

> > (especially Advanced Power Management). This program works fine, but

> > has to be executed in each session. This is no problem, because it can

> > simply be but into a batch file and placed in the start-up folder.

>

> > However, I frequently use limited user accounts. Here, the command

> > does not work. It terminates with "hda: Permission denied". Is there

> > an option to let windows execute the command before I log into the

> > limited user account and thus to keep the option set while I work in

> > that account? I also have to mention that I usually use the hibernate

> > function, so actually, there is no real start-up process.

>

> > The situation is the following: When I am looged in as an admin and

> > start hdparm and then change into a limited account everything is fine

> > and the HDD option is set. When I then put the computer into

> > hibernation and then wake it up again next morning the setting is gone

> > and I have to switch to an admin account to make hdparm set the option

> > again.

>

> > Does anybody of you have an idea how I could solve this problem?

>

> > Greetings.

>

> Since this program affects the system, not the user session, you should

> execute the command as part of your startup process. It would be

> sufficient to schedule your batch file to run at boot time. Don't invoke

> it as part of the logon process.

>

> When returning from hibernation then you could use Hibernate Trigger

> to invoke your batch file again:http://www.desimonesystems.com/suspendtrigger/index.php

> I haven't tried it myself - this is an educated guess.

Guest Pegasus \(MVP\)
Posted

Re: "Using hdparm in limited user accounts" or "starting progs with admin rights before waking up from hibernation"

 

Re: "Using hdparm in limited user accounts" or "starting progs with admin rights before waking up from hibernation"

 

 

<PatrickBrzoskaPB@googlemail.com> wrote in message

news:82f53d91-72b2-4ea6-8d45-91fd0497eb21@i76g2000hsf.googlegroups.com...

> Hi, when I use Hibernate Trigger programs are not executed with admin

> rights. It is just like starting the batch myself by clicking when

> returning from hibernation to my limited account.

>

 

You could get Hibernat Trigger to create a semaphore file which

gets picked up by a task scheduled to run every five minutes. Not

particularly elegant but effective . . .

Guest PatrickBrzoskaPB@googlemail.com
Posted

Re: "Using hdparm in limited user accounts" or "starting progs withadmin rights before waking up from hibernation"

 

Re: "Using hdparm in limited user accounts" or "starting progs withadmin rights before waking up from hibernation"

 

 

Semaphore file? What's this? And how will it overcome the limited

rights on a LUA?

Guest Pegasus \(MVP\)
Posted

Re: "Using hdparm in limited user accounts" or "starting progs with admin rights before waking up from hibernation"

 

Re: "Using hdparm in limited user accounts" or "starting progs with admin rights before waking up from hibernation"

 

 

<PatrickBrzoskaPB@googlemail.com> wrote in message

news:4f92e34c-02fb-4d9e-8b73-37c7c7820c61@m44g2000hsc.googlegroups.com...

>

> Semaphore file? What's this? And how will it overcome the limited

> rights on a LUA?

 

Simple:

1. You get Hibernate Trigger to create the file c:\semaphore.txt

(for example) when the machine wakes up.

2. A scheduled task running once every five minutes under

an account with admin privileges checks for the presence

of c:\semaphore.txt. When it finds it then it does two things:

a) It deletes c:\semaphore.txt.

b) It runs hdparm.exe.

As I said, not elegant but effective.

Guest PatrickBrzoskaPB@googlemail.com
Posted

Re: "Using hdparm in limited user accounts" or "starting progs withadmin rights before waking up from hibernation"

 

Re: "Using hdparm in limited user accounts" or "starting progs withadmin rights before waking up from hibernation"

 

But this way the admin account needs to run in the background

(slowing down the systems).

In case it runs anywhy, hdparm could also be started normally (via the

startup or via scheduled tasks "run at log-on") or am I wrong?

 

On 14 Jul., 23:49, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:

> <PatrickBrzosk...@googlemail.com> wrote in message

>

> news:4f92e34c-02fb-4d9e-8b73-37c7c7820c61@m44g2000hsc.googlegroups.com...

>

>

>

> > Semaphore file? What's this? And how will it overcome the limited

> > rights on a LUA?

>

> Simple:

> 1. You get Hibernate Trigger to create the file c:\semaphore.txt

>     (for example) when the machine wakes up.

> 2. A scheduled task running once every five minutes under

>     an account with admin privileges checks for the presence

>     of c:\semaphore.txt. When it finds it then it does two things:

>     a) It deletes c:\semaphore.txt.

>     b) It runs hdparm.exe.

> As I said, not elegant but effective.

Guest Pegasus \(MVP\)
Posted

Re: "Using hdparm in limited user accounts" or "starting progs with admin rights before waking up from hibernation"

 

Re: "Using hdparm in limited user accounts" or "starting progs with admin rights before waking up from hibernation"

 

If you can measure a slow-down effect of a scheduled task that executes

the command

 

if not exist c:\semaphore.txt goto :eof

 

then I would love to hear how you achieve this amazing feat.

 

I covered the startup sequence in my previous reply - please have

another look at it.

 

<PatrickBrzoskaPB@googlemail.com> wrote in message

news:7ab1f536-b3df-4302-996b-cb207ff609c1@w7g2000hsa.googlegroups.com...

But this way the admin account needs to run in the background

(slowing down the systems).

In case it runs anywhy, hdparm could also be started normally (via the

startup or via scheduled tasks "run at log-on") or am I wrong?

 

On 14 Jul., 23:49, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:

> <PatrickBrzosk...@googlemail.com> wrote in message

>

> news:4f92e34c-02fb-4d9e-8b73-37c7c7820c61@m44g2000hsc.googlegroups.com...

>

>

>

> > Semaphore file? What's this? And how will it overcome the limited

> > rights on a LUA?

>

> Simple:

> 1. You get Hibernate Trigger to create the file c:\semaphore.txt

> (for example) when the machine wakes up.

> 2. A scheduled task running once every five minutes under

> an account with admin privileges checks for the presence

> of c:\semaphore.txt. When it finds it then it does two things:

> a) It deletes c:\semaphore.txt.

> b) It runs hdparm.exe.

> As I said, not elegant but effective.

Guest PatrickBrzoskaPB@googlemail.com
Posted

Re: "Using hdparm in limited user accounts" or "starting progs withadmin rights before waking up from hibernation"

 

Re: "Using hdparm in limited user accounts" or "starting progs withadmin rights before waking up from hibernation"

 

Hi, I found another solution for my problem.

 

I simply run the program using the command "runas /user:USERNAME

"Progname.exe". Works fine.

 

On 15 Jul., 01:15, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:

> If you can measure a slow-down effect of a scheduled task that executes

> the command

>

> if not exist c:\semaphore.txt goto :eof

>

> then I would love to hear how you achieve this amazing feat.

>

> I covered the startup sequence in my previous reply - please have

> another look at it.

>

> <PatrickBrzosk...@googlemail.com> wrote in message

>

> news:7ab1f536-b3df-4302-996b-cb207ff609c1@w7g2000hsa.googlegroups.com...

> But  this way the admin account needs to run in the background

> (slowing down the systems).

> In case it runs anywhy, hdparm could also be started normally (via the

> startup or via scheduled tasks "run at log-on") or am I wrong?

>

> On 14 Jul., 23:49, "Pegasus \(MVP\)" <I....@fly.com.oz> wrote:

>

> > <PatrickBrzosk...@googlemail.com> wrote in message

>

> >news:4f92e34c-02fb-4d9e-8b73-37c7c7820c61@m44g2000hsc.googlegroups.com....

>

> > > Semaphore file? What's this? And how will it overcome the limited

> > > rights on a LUA?

>

> > Simple:

> > 1. You get Hibernate Trigger to create the file c:\semaphore.txt

> > (for example) when the machine wakes up.

> > 2. A scheduled task running once every five minutes under

> > an account with admin privileges checks for the presence

> > of c:\semaphore.txt. When it finds it then it does two things:

> > a) It deletes c:\semaphore.txt.

> > b) It runs hdparm.exe.

> > As I said, not elegant but effective.


×
×
  • Create New...