Permissions in appdata\local\microsoft\windows sidebar

my gadget calls a bat file which in turn calls an exe. i get permission denied and the bat will not run when my gadget it located in 'C:\Users\%username%\AppData\Local\Microsoft\Windows Sidebar\Gadgets'. It however works perfectly when my gadget is placed in 'program files\windows sidebar\gadgets' directory.

My account has full permissions to the folder in appdata and i can run the bat file manually, but the gadget will not allow it to run. I assume this is by design, but is there any way to bypass this Or a way to change the default path my gadget installs to (program files, instead of appdata)

Thanks



Answer this question

Permissions in appdata\local\microsoft\windows sidebar

  • LankyNibbs

    please don't use c:\users\%username%\AppData use %userprofile%\AppData
  • arogan

    nadasurf

    I have not received anything can you send it to tom<<<<<AT>>>>>cener.co.uk

    Replace <<<<<AT>>>>> with @

  • jeremy2006

    FALSE ALARM!

    I feel like such a n00b. I had left one path hardcoded to the old directory (program files) instead of using 'System.Gadget.path'.

    It appears to work just fine with running a bat file from it's default install path (C:\Users\%username%\AppData\Local\Microsoft\Windows Sidebar\Gadgets)

    Thanks all for your help anyway


  • NewbieDude

    re-sent!
  • KevinBurton

    You are far better off using System.Gadget.path, rather than assuming the gadget lives in a particular location underneath the 'AppData' directory. Some of the changes we are considering for the next version of sidebar may change the location where per-user gadgets are stored; so just in case, we'd really like to limit the number of people hard-coding that path - don't be broken by v2!


  • jxl98c

    Sidebar runs in protected mode, so you're probably causing UAC to fire when it tries to run the BAT file. You won't see these through a Gadget, hence the obscure error.

    You could try creating a manifest for the BAT file (perhaps someone can confirm this will actually work) - or recode the batch file into your gadget.

  • Visions.net

    ah yes, I was just typing the path to demonstrate where it was going. I am using System.Gadget.path all around in my gadget.
  • adwins04

    if you like send me your gadget i see what i can do for you.
  • enric vives

    Jonathan - Yea I could try coding the bat file into the gadget, the only problem is the bat file calls an exe. Something tells me if I don;t have permission to run a bat, I won't be able to run an exe either. But i'll have to give this a try on Monday.

    Tom from cener.co.uk wrote:
    if you like send me your gadget i see what i can do for you.

    Thanks Tom, it has been sent.


  • Permissions in appdata\local\microsoft\windows sidebar