Question

Locked

Inconsistent login script failure

By munsch ·
Hello,

We have a small custom app that needs to be accessed by all users. It connects to a central database. The app itself is updated occasionally, and users will always need the current version; for added fun, call center users do not have consistent seating and i am using roaming profiles.

I have the primary hdd of each machine will all perms except FC set to Domain Users. On login, a script copies the app from a central share to the local machine, creating a folder on the top level of C: and putting the app in there; it also creates a shortcut to that app on the user's desktop (their profile). On logout, both these items are deleted.

I did it this way because i was having severe perm problems otherwise - it used to check the timestamp of the app and only copy it if it was a newer version, but the app was always owned by the previous user to log into that workstation and couldn't be overwritten by the current user, so it failed.

This silly method of "sweeping up behind" seems to be working - except every now and then, for no apparent reason, a user gets the shortcut on their desktop but not the app, nor the folder it's to go in. They try the shortcut and get "can't find..." and sure enough, target folder/app is not there. Rechecking C: perms, i see Domain Users have write/modify etc. on the drive.

Long explanation there. Cheers if you're still reading.

Why the inconsistent failure? Is this a race condition? Once login scripts are running, the user is deffo recognized as a Domain User, aren't they...? It's copying the shortcut, so why not the app (using xcopy in the script for both)? Any insights would be greatly appreciated.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

I've seen something similar with drive mappings

by smallbiz-techwiz In reply to Inconsistent login script ...

that wouldn't stick consistently. We had to create a shortcut on the desktop that would allow the user to re-run the login script again after they logged in. You might try this as a work-around.

Collapse -

Copy vs Install

by Bizzo In reply to Inconsistent login script ...

It sounds like the application is being copied locally, and not installed, right?
In this case why not run the application from a shared network drive? That way the app wouldn't need to be copied, just map a drive to the correct share, and copy the shortcut locally.

Collapse -

Local changes to app

by munsch In reply to Copy vs Install

Well - unfortunately it's an .mde that users are making local changes to, and it acts as a front-end to a central database. All users need their own (writable) copy.

Collapse -

OK

by Bizzo In reply to Local changes to app

It does sound like you have a race condition here.

What you could try is, instead of copying the app to the root of C:, copy it to C:\%username%. That way, the shortcut and copy script is the same for all users. And you won't get in the situation where you're unable to overwrite the files due to user permissions. If the files don't (for whatever reason) get deleted for user A, then user B gets their files copied to their area. And when user A logs in again, their files get overwritten with the newer ones, with no permission conflict.

The only downside I can see with this, is that if none of the files/apps get deleted, and you have a lot of different users logging on/off the same machine, disk space may be an issue.

Collapse -

Thanks

by munsch In reply to OK

If my current solution doesn't work, i may go with this. To avoid filling the disks, i could probably just have a sweep-up logout script that deletes it: in theory only one copy of %username&/App will exist at any one time that way.

Collapse -

Why not leave the folder?

by 1bn0 In reply to Inconsistent login script ...

Set permissons for everyone and just copy the contents.

Delete the contents at exit or clean it out at logon.

1. Delete current contents of folder.
2. Copy files to folder for new user.

Collapse -

That's what i have now,

by munsch In reply to Why not leave the folder?

It is just inconsistently failing :)

Back to Hardware Forum
7 total posts (Page 1 of 1)  

Related Forums