Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start program with Administator privilege as default User at boot. 2

Status
Not open for further replies.

grofaty

IS-IT--Management
Jan 16, 2003
370
SI
Hi,
I have a User privilege (not Administator privilege!) on Windows XP SP2. I would like to automatically start application at boot time (restart Windows) as Administrator user. I know I can use use runas command to execute program as Administator user, but using this command I need to write password by myself. Is there any way to run program at boot time with Administrator privileges whit out manually entering a password?
Thanks,
Grofaty
 
Hi Malik,

Say you have a program called RMAA.EXE (e.g. RunMeAsAdmin.exe) which only works properly when run as Administrator.

You can use 'RunAsUser' in two ways. One is to 'wrap' RMAA.EXE so it runs as Administrator. In this case RMAA.EXE is 'wrapped' into another program, together with the administrator password. When executed, the wrapper program runs the program using RunAs but without showing the Administrator password.

Alternatively you can use it to create a small new program which runs RMAA.EXE using RunAs but without showing the administrator password.

Just try it and you'll see how easy it is to use.

Hope this helps...

 
Hiya Greg,

Welcome back... it's been a while but I noticed recently that you had returned with a vengeance <grin>

Rick
 
Yeah after being hooked on Tek-Tips for about 2 years, my wife gently weened me off the site and i'd been "sober" for about 12 months.

I had to ask a couple of questions myself last month and decided it was about high time that I started back here again.

Greg Palmer
Freeware Utilities for Windows Administrators.
 
Hi,
this RunAsUser.exe is excellent tool. But I have a problem on setting a "Local Area Connection Properties". I use notebook at home and at the company I work for. At home "Internet Procotol (TCP/IP) Properties" are set to "Obtain an IP address automatically" and "Obtain DNS server address automatically". At work I need to specify IP adress and DNS server adresses. How to do this with RunAsUser.exe program?

Thanks,
Grofaty
 
Can't you just add your self as an Administrator in the Local Administrators Group?

Right Click My Computer and Click Manage

Click on Local Users and Groups

Click on Groups

Double Click on Administrators

Add your account to that Group, or you may have to have your IT Manager add you. Doing that allows you to still remain a user on the network but allows you to be an Administrator on the local Machine and that will allow you to make changes and install things as needed. Thats how I have my networks setup and it works good for me.
 
There is also the ability to add alternative details in the IP address entry dialogue.

Open up the Connection Properties for the connection in question.

Select Internet Protocol and click on Properties - At the top there is a section for Alternative Configuration.

I'm not sure if you could do this using the runasuser program as I don't know a way to open a specific connections property window by command prompt.

Greg Palmer
Freeware Utilities for Windows Administrators.
 
Hi,
sorry now I have figured out I am changing connection IP addresses using "ThinkVantage Access Connection" program applied by IBM. So the problem was hot to find the exe file witch makes a IP switch. So I used freware Autoruns program from sysinternals.com to get all set programs that starts at boot time - so I got registry string and then I just replaced the settings using regedit.exe from program.exe to program_created_by_RunAsUser. And it works fine...

Thanks,
I solved the problem.
Grofaty
 
Hi,
one more question. I have created exe file by RunAsUser program. What happens if Windows password get changed?
Thanks,
Grofaty
 
Grofaty,

You could modify the registry directly (using VBS) to change the settings but I suspect you'll have more success finding a way to automate NETSH using a script, including elevating privileges using Greg Palmer's RunAsUser utility.

Have a look at
After you have the NETSH scripts to configure your home and work settings automatically then you should be able to automate them using elevated privileges.

Just bear in mind that any changes to the HKCU registry hive are usually dynamic whilst any changes to the HKLM registry hive appear to require a reboot to take effect ('cos HKLM seems to be only read once on bootup).

Hope this helps...

PS - If anyone knows how to force a re-read of the entire registry including the HKLM hive then please let me know.
 
rick998 said:
If anyone knows how to force a re-read of the entire registry including the HKLM hive then please let me know.

Often Ending the explorer.exe process in task manager and restarting it will take new registry changes onboard. Depends which registry changes as some really are only utilised on startup.

grofaty said:
I have created exe file by RunAsUser program. What happens if Windows password get changed?

You have to recreate the exe created by RunAsUser.



Greg Palmer
Freeware Utilities for Windows Administrators.
 
Hi,
rick998, gpalmer711 thanks for your help.

One more question. I have manage to create all programs with RunAsUser, just one is making me mad. It is OpenVPN open source program to have Virtual Private Network from my home to get access to office computer.

Creating exe with RunAsUser with Administrative privilege when run it returns error: "Cannot load certificate "SUBJ:Certificate_name from Microsoft Certificate Store...". Loggin in with Users privilege (no RunAsUser) it returns error: "All TAP-Win32 adapters on this system are currently in use." OpenVPN is working normaly if I increase my user account from Users to Administrators privileges.

So it looks like my username must be used, because using Administrator userid will not accept certificate, because there is not correct userid associated with certificate. But using my userid with Users privilege without RunAsUser option it just don't have soficient priviliges.

Any idea how to solve the problem?

Thanks,
Grofaty
 
gpalmer711, sorry for delayed response.

I solved the problem of OpenVPN by
1. exporting certificate of my user with Windows User privileges (Control Panel | Internet Options | Content tab | Certificates button | Personal tab | select certificate and Export button).
2. importing certificate to my Administrator user
3. created exe file with Administration privileges to user with User rights with program RunAsUser.exe solution by PalmersSoft.
4. changed registry key using freeware program autoruns.exe by sysinternals.com. This program helped my find registry key to auto start the program at boot time.

So no I can connect to remote server using VPN from my user with Windows User rights! That was the goal. Problem solved.

Thank you very much for helping me out. Thanks Rick998 to you too. This is excellent forum! I have given a star to you both.

Have a nice day,
Grofaty
 
Isn't it crazy that we have to go to these lengths to get software to work as it should!

I'm glad that you managed to get it working.

Greg Palmer
Freeware Utilities for Windows Administrators.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top