locked
Need to deploy a C program .exe on domain as logon script to display some info. RRS feed

  • Question

  • Hello to all,

       I have some different requirement regarding logon scripting. I created a C program which is meant to be run on domain PCs when they login. This .exe program runs some DOS commands using system function, then writing output to few files. I then pick up required information from files & prints it on to a console screen. While creating this program using C compiler, it gathers all the info & prints to screen properly. It uses following commands in program:

    1.    reg export  "...."  "c:\\windows\\web\\wallpaper\\reg_xport.txt"   {"..." means some registry path, e.g.- HKLM\.... etc}

    2.    systeminfo > "c:\\windows\\web\\wallpaper\\sys_info.txt"

    3.    wmic qfe get installedon > "c:\\windows\\web\\wallpaper\\patches_info.txt"

           Two issues over here are that 'reg export' to a file and 'wmic' require admin privileges on domain PC & thus the program should carry admin rights while executing. But AFAIK logon scripts run with user rights. So I'll need a workaround solution for this.

          I got this .exe to be implemented by my Administrator as alogon script. The program runs, creates files and removes them also(as a part of program), but shows no output on screen. I got another idea of implementing it as a logon installer, but I guess .exe will have to be converted to .msi first.

          Now please provide me some solution for this. Thanks...

    Friday, August 30, 2013 6:17 AM