Running the updates with out being administrator

Hi,

We have already started using wyUpdate and it works great , but lately, we are running into a trouble with tightly controlled environments that for each machine that needs to run the update - It only can run by the administrator and stranded users are not being able to run the updates. The production machines are mostly Windows XP running under a domain controller and AD.

I would like to know if there is a way to do any of the following:1- Bypass the requirement to run the update as an administrator.2- If we can somehow push the updates in a matter as administrator controlled push something like "Wsus" (Windows Server Update Services) process.

Thanks!

I would like to know if there is a way to do any of the following:1- Bypass the requirement to run the update as an administrator.

Yes, this is possible. If you install the app entirely in the user account (e.g. to the %appdata% folder, desktop, documents folder, etc.) and all the registry entries are for Current User, then wyUpdate won't require admin privleges to update your app. It will just let the user update without bothering them about admin user/password.

2- If we can somehow push the updates in a matter as administrator controlled push something like "Wsus" (Windows Server Update Services) process.

Not yet. We plan to add something similar in the future.

Having begun testing my app on users' machines, met a problem with "SeSecurityPrivilege". It is very strange cause i don't use any admin required folders and registries for my app. I even tried not to use registry keys at all, but the problem persists. wyUpdate launches without asking about entering admin's credentials, then it checks for new version, it finds it, tries to update and suddenly finishes with a message about "SeSecurityPrivilege".... and of cause no files are updated. As a download site i tried both web server and local server (unc path).We have a domain network with windows xp on users' comps.Any ideas please?

I have a few questions:

1. Can you print out the message in full (Click the "Show details" button)?2. Where are you installing the files to (%appdata%, Desktop, etc.)?3. What version of wyUpdate are you using (right click, click Properties)?4. What OS (XP, Vista, Windows 7)?

Thanks for response, Sam.

1. The message under the 'Show details' button is: "The process does not possess the 'SeSecurityPrivilege' privilege which is required for this operation."

2. Files are installed only in "Current user's AppData folder\company\product".

3. I'm using the latest version 2.6.0.0

4. Windows XP SP2 and SP3. Both the same error.

Ok, I'm going to try to reproduce this error. I'll get back to you.

Thanks flamierd, but that';s not applicable here. It's a bug somewhere in our installation code. We're still tracking it down.

I've definitely duplicated the issue on a Virtual XP Pro box logged in through AD services.

So the question I guess is why is it trying to perform operations needing elevated privs.

My tiny bit of research seems to point toward accessing the EventLog class.

We've replicated this issue as well.We'll have this fixed by next week.

Great! I am looking forward to this...

ICM,

The bug we fixed was unrelated (but similar) to the bug you reported. We're having trouble reproducing the bug you reported. Can you send us your wyBuild Project file (*.wyp file) to support@wyday.com ?

Hi, Sam!Check your email.

Thanks. This was a bug that we thought we fully fixed in the past. Obviously we missed this odd edge case. This bug is fixed in wyUpdate 2.6.1 coming out soon.

Now, I need to address how you're creating your updates. You should be adding your products files to the "Your program's folder". Even if your program's folder is always in %appdata%\Your Company\YourProduct\ .

[attachment=0]how-to-setup-your-project.png[/attachment]

wyUpdate is smart enough to detect if it's only installing to the %appdata% folder and whether it needs elevation or not. Your really shouldn't hardcode the installation folder like you were doing in the project. Because who says your users will install to "%appdata%\Your Company\YourProduct\" and not "%appdata%\YourProduct\", "Desktop\YourProduct", or even "USB Stick 1\YourProduct".

If you use the "Your program's folder" you don't have to worry about these details.

That being said. Thanks for spotting this obscure wyUpdate bug.

Thanks, Sam!My app's installer doesn't ask a user to specify install path - everything is hardcoded: some files goes into "%program files%/Company/Product", some into "%appdata%\Company\Product\". The files supposed to update are located in "%appdata%\Company\Product\", that's why i use this path in wyUpdate project.

So if you fixed that bug it's cool, if not - don't bother yourself. I'll find some other way to do this within our domain environment. But for users that will be using my app outside our office, wyUpdate will do it's job pretty well, cause usually users are admins of their home computers and moreover they don't use domains at home 😀 (hopefully)

If you use the "Your program's folder" you don't have to worry about these details.

But how does wyUpdate know where my app is installed?

But how does wyUpdate know where my app is installed?

When you include wyUpdate with your app it needs to be put in the base directory of your product (see Including wyUpdate with your application). wyUpdate simply looks at where it is and assumes that that is the base directory.

The SeSecurityPrivilege bug is fixed in wyUpdate 2.6.1, out now.

Good job! 🙂 Many thanks 😎