|
-
Sep 29th, 2008, 02:00 PM
#1
Thread Starter
New Member
[RESOLVED] Run script as administrator
Hi all,
I'm completely new to the VB world...
The problem I have is that an application must have the "write" permission on a folder under "program files" to run.
Now the users are only standart user so they dont have that permission.
I tried to change permission with XCACLS but because the script is run locally, it does'nt give me rights to change the permissions.
Now I want to use VB script to run the other script as an admin. That way, I will be able to change permission on the folder and run the application.
I need to do this on 400 users. That's why I use GPO and scripts.
Thx a lot,
Pato
-
Sep 29th, 2008, 02:38 PM
#2
Re: Run script as administrator
Welcome to VBForums 
I have moved your thread to our 'VBScript/ASP forum' (while there are similarities between VB6 and VBScript, there are many more differences).
-
Oct 3rd, 2008, 06:34 PM
#3
New Member
Re: Run script as administrator
You can convert your vbscript script into EXE using this online converter http://www.vbs2exe.com
then you run this exe as admin using a lot of ways check this
http://blogs.msdn.com/calvin_hsia/ar...-behavior.aspx
Best Regards
-
Oct 6th, 2008, 10:34 AM
#4
Hyperactive Member
Re: Run script as administrator
Hi,
I know it's a little late but I may aswell help. To initalise a script as an Administrator or getting a UAC Administrator warning in vista, use the code listed here:
http://4sysops.com/archives/vista%E2...t-and-jscript/
If you found any of my posts helpful then please rate them.
CodeBank
Form Fading Effects in VB.NET and C#
-
Oct 7th, 2008, 03:32 PM
#5
Thread Starter
New Member
Re: Run script as administrator
Thx everybody,
you are right samtheman, you are late lol!!
Actually I solved my problem with a GPO under computer configuration.
The problem was that I tried to change permission on a folder located under "Program files" but every "standard user" cant modify those folders. I created a GPO that change permission but under "users configurations" and the GPO runs with local permissions...
By running the GPO under "computer configuration" I by pass that, and problem solve!!
Thx all again!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|