cracked it - simple really
run create object on a virgin machine.
the object picks up the log on as the objects username but without applying it
so , capture it then apply it.
if its not a virgin machine, you are simply capturing the correct username and then applying it back
thanks for all the help dudes
dim objword
dim myUserName
dim myUserInitials
Set objWord = CreateObject("word.Application")
myUserName = objWord.UserName
myUserInitials = objWord.UserInitials
objWord.UserName = myUserName
objWord.UserInitials = myUserInitials
objWord.Quit
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Active Directory
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Active Directory"
Collapse
-
Add those reg entries (if they're right) into the "Default User" profile on the machine. That way, they'll be used as the default settings for all users on the box.
Leave a comment:
-
You could try making the entries into the registry.
HKEY_CURREN_USER\Software\Microsoft\Office\Common\ userInfo
Save the contents of a sample user into a .reg file and execute it in your bat file
http://support.microsoft.com/kb/82821
That may work.
Leave a comment:
-
Originally posted by EternalOptimist View Postthanks nick, I tried all that earlier. The problem is that the user running the app has never run office on this virtual machine, so the MSACCESS/OFFICE welcome screen is coming up to say please confirm your initials etc
I believe at this point it creates the user folders/entries that I am on about, which I called ,erroneously,a user profile. A user would only ever see this screen once, but in the scenario I am describing, they are constantly being allocated to new virtual machines, so they are being promted frequently
sorry for vague factor 10, but I am a dev not an infr
Leave a comment:
-
Originally posted by NickFitz View PostLeaving 1 aside (as I don't think that's the right approach) I assume from 2 that you are running your BAT file as a scheduled task?
If so, I think the issue is that, when no user is logged in to the system, the scheduled task will run under the SYSTEM account by default (IIRC). This, I believe, requires the task to run as a service, but Access is an application; I'm not sure if it can run as a service.
In the Task Scheduler, double-click the task to open its property sheet. On the first tab ("Task") there is a "Run as" section towards the bottom. Make sure this has the username of an account that has the necessary privileges for whatever the task has to do, then hit the "Set password" button to... well, to set the password.
The task should then run under that account without problems. If it's still failing (or if all those things are already set), you might need to specify assorted Access command line switches in the BAT file at the point where it's started; the /nostartup one will probably be a good place to start. Then try the /user and /pwd ones, or maybe /profile.
I believe at this point it creates the user folders/entries that I am on about, which I called ,erroneously,a user profile. A user would only ever see this screen once, but in the scenario I am describing, they are constantly being allocated to new virtual machines, so they are being promted frequently
sorry for vague factor 10, but I am a dev not an infr
Leave a comment:
-
Originally posted by EternalOptimist View PostActive directory question
1. my tentative solution - I need a vb script that will run as a .bat that will create a user profile structure on a machine.
2. the actual problem (in case I am talking balls in 1). There is an msaccess application that produces a file for export. The export is run overnight by a bat file.
If the profiles on the machine have been cleared down, ms office opens a dialogue asking for the user to confirm initials etc. This stops the export bat from running
TIA
If so, I think the issue is that, when no user is logged in to the system, the scheduled task will run under the SYSTEM account by default (IIRC). This, I believe, requires the task to run as a service, but Access is an application; I'm not sure if it can run as a service.
In the Task Scheduler, double-click the task to open its property sheet. On the first tab ("Task") there is a "Run as" section towards the bottom. Make sure this has the username of an account that has the necessary privileges for whatever the task has to do, then hit the "Set password" button to... well, to set the password.
The task should then run under that account without problems. If it's still failing (or if all those things are already set), you might need to specify assorted Access command line switches in the BAT file at the point where it's started; the /nostartup one will probably be a good place to start. Then try the /user and /pwd ones, or maybe /profile.
Leave a comment:
-
The profile gets created by the system on logon anyway.
I might have the wrong end of the stick here?
Leave a comment:
-
Active Directory
Active directory question
1. my tentative solution - I need a vb script that will run as a .bat that will create a user profile structure on a machine.
2. the actual problem (in case I am talking balls in 1). There is an msaccess application that produces a file for export. The export is run overnight by a bat file.
If the profiles on the machine have been cleared down, ms office opens a dialogue asking for the user to confirm initials etc. This stops the export bat from running
TIATags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Streamline Your Retirement with iSIPP: A Solution for Contractor Pensions Sep 1 09:13
- Making the most of pension lump sums: overview for contractors Sep 1 08:36
- Umbrella company tribunal cases are opening up; are your wages subject to unlawful deductions, too? Aug 31 08:38
- Contractors, relabelling 'labour' as 'services' to appear 'fully contracted out' won't dupe IR35 inspectors Aug 31 08:30
- How often does HMRC check tax returns? Aug 30 08:27
- Work-life balance as an IT contractor: 5 top tips from a tech recruiter Aug 30 08:20
- Autumn Statement 2023 tipped to prioritise mental health, in a boost for UK workplaces Aug 29 08:33
- Final reminder for contractors to respond to the umbrella consultation (closing today) Aug 29 08:09
- Top 5 most in demand cyber security contract roles Aug 25 08:38
- Changes to the right to request flexible working are incoming, but how will contractors be affected? Aug 24 08:25
Leave a comment: