Sign in to follow this  
Followers 0
chaitanyagutala

Read data from a variable and and paste it in text file

4 posts in this topic

#1 ·  Posted (edited)

Hi all,

I am trying to write a script which will check whether open office is installed in a machine or not. If installed it should get the hostname and copy it to text file in c drive.With the below script I am able to get whether open office is installed or not . can anyone please give me some suggestion how can I read value from the variable('$openoffice' in the script) and send the value to text file in c drive. I have 50 machines and I am trying to create a group policy and implement this.If open office is installed the machine's hostname should be redirected to C:\hosts.txt file. If open office is not installed then move to next machine.

Please check my script

#include<process.au3>

if FileExists("C:\Program Files\OpenOffice.org 3\program\") Then

$openoffice =RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ActiveComputerName","ComputerName")

_RunDOS( "$openoffice > C:\host.txt")

Else

Exit

EndIf

using the above script it is reading data from registry. so that we can come to know open office is installed or not.I am trying to use _RUNDOS command to redirect the value from $openoffice to C:\hosts.txt file but I am not able to do that.Please help me out.

Edited by chaitu

ChaitanyaKumar GI dont make mistakes.I just have learning.I have no special talents. I am only passionately curious.

Share this post


Link to post
Share on other sites



Thank you very much dude

I ll try it and let you know thank you again


ChaitanyaKumar GI dont make mistakes.I just have learning.I have no special talents. I am only passionately curious.

Share this post


Link to post
Share on other sites

Thats working dude. Thank u very much


ChaitanyaKumar GI dont make mistakes.I just have learning.I have no special talents. I am only passionately curious.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0