ActiveX Control / Modify file, or execute .batch file

Posted on 2006-04-26
Last Modified: 2008-01-09
Here is the thing.
Yes I know it sounds reallllllly nasty, however bare with me here.
I am a Systems Administrator for a company that has its finance Department, use IE 7 so that they can access bank institutions websites.
We have stressed how much we would prefer them to use Firefox, however in this case, I think IE might be good for us.

I need to set some envirement variables onto the finance groups machines, and each person is going to have to pick which settings they need.
However, there are to many of them to do this manually.
I have set up a page, that gives them the ability to select the setting right for them, and this determins which batch file they download and place in
C:\Documents and Settings\All Users\Start Menu\Programs\Startup.

Now, alot of them have been complaining they cant find this folder, etc..

Is there a way, that an ActiveX control can be used to run the appropriate file via the browser after they accept the control?
Maybe3 even a step more and have it place the file where it needs to be?
If not a correctly written .bat file can be used to copy the appropriate file to that directory.

If you catch my drift, that woudl be great, I am after ease for the employees.
Yes, I hate that we have to use .bat files, but if you can think of another easy non user needed way to set them, without GP, that woudl be just as neat.

PS: No, we don't use logon scripts, each user has local accounts on each machine.
Question by:KellyCraig
    LVL 30

    Expert Comment

    did this work before?
    if so, apply this

    Recent windows update

    Copy the following to the clipboard (it's all one line even if wrapped in your browser - paste into notepad and remove line breaks if necessary, and copy again)
    click START, type RUN <enter>

    =copy below here=
    REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached" /v "{A4DF5659-0801-4A60-9607-1C48695EFDA9} {000214E6-0000-0000-C000-000000000046} 0x401" /t REG_DWORD /d 1
    =copy above here=
    LVL 4

    Author Comment

    did what work before?
    I think your nto quite understanding me.
    Please re-read the question.
    I want to be able to modify/replace/or execute a file located on a server, on an employee's computer via a web page.
    Using ActiveX Xontrols.

    Fo instance.
    There are 4 .bat files on the web server.


    I want the users to be able to pick thier division and then have Active X controls run the commands in the batch file on their computer via the browser.
    Am I making sense?
    LVL 30

    Expert Comment

    what is contained the batch file?
    LVL 4

    Author Comment

    We have a program that they use for accounting that gets secure files off of different servers, which for security purposes, has their name and IP changed weekly.
    The servers contain the files needed to run the program.
    These batch files would simply contain 1 line, a SET command to set the path of the server.

    So fo instance the Bf.bat would say
    SET CITRIXPATH = "\\server1\secure\HXBG1KY\citrix"

    Now, as it is, they must download the file and place it in the folder I told you about.
    But many cant seem to find the folder.

    so this would allow us to tie the execution of this web page into the program, so before they ran it each time, it would run the set sommand.
    LVL 30

    Expert Comment

    Rather than go the complex route

    Just type in the URL of IE

    C:\Documents and Settings\Defaultuser\Desktop\bf.bat

    You will be prompted to RUN, the batch on it, it will run and you wil have your environment variable set.  Make this a Favorite and/or add this as a link to the the IE Toolbar.
    LVL 4

    Author Comment

    We thought of that route, however we got employees saving and not running, running as other people, half could do it, others couldnt.
    Some would save and run then next week bitch that it didnt work.

    We need it to be done without anything from them other than to log in and accept the active x control.
    LVL 30

    Accepted Solution

    "Some would save and run then next week bitch that it didnt work."
    Ha!  I feel your frustration... about this...

    same method..but we create a batch file for interactive response.
    Press 1 for var/www/html/files/sag/Bf.bat
    Press 2 for /var/www/html/files/sag/travel.bat
    Press 3 for /var/www/html/files/sag/claims.bat
    Press 4 for /var/www/html/files/sag/records.bat

    We'll place that .bat file in the STARTUP folder  forcing it in their face..

    Sound like a plan?

    If so, I'm going to sleep for a bit and will return about 8hours from now and figure out a .bat file for you.  I've done this years ago...but that is way back when we had DOS6.22.  and I'm rusty.

    Please advise.
    LVL 30

    Expert Comment

    cool. thank you!

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
    This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
    Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
    Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now