I have an application that runs as a service. This application allows the user to connect and starts a subprocess under the user's windows account. In other words, mydomain\john connects to the service via TCP and says "launch" which starts a process on windows running under mydomain\john account.
Next, this subprocess is able to map drive T: using net use command. Then the process can run a VB script living on the mapped drive T:. No trouble so far. the problem arises when this VB script tries to run Excel using "createObject".
After setting DCOM launch settings with DCOMCNFG and creating the missing "Desktop" folder in the systemprofile folder, I still cannot get this to work. Oddly, if run my vb script and feed Excel a UNC path \fileserver\share1 rather than T:\ the script works.
Does anyone know why Excel would fail to access the T:\ mapping but have no issue with the UNC path?
Related
I have written and compiled an AutoIT script ("BiconNET.exe") which interacts with the user when double-clicked. While running, the taskmanager lists the program as an App.
Now, I would like to remotely start BiconNET.exe. So I installed and configured openSSH, Cygwin and Putty. Server and client run on Windows 8.1.
I create the SSH-connection using the windows login credentials from the server. I start BiconNET.exe through the Putty conmmandline and I see instantly BiconNET.exe pop up as a service in the taskmanager of the server. But no user interaction follows. The service remains silent, and BiconNET.exe doesn't do any of the tasks its supposed to do. What is wrong here?
I guess I need to achieve that BiconNET.exe runs as an App, not as a service!?
This is what I tried so far:
I tried a workaround using a batchfile, but same issue here: Doubleclicking the batch-file on the Server works fine (BiconNET.exe interacts with the user as wished), but running it through Putty BiconNET.exe gets listed as a service, not doing anything.
I also tried to auto-elevate the batch file using this code. No luck.
I excluded BiconNET.exe from the "Data Execution Protection" (DEP) in the advanced system properties of the server. Makes no difference
I would like to understand where the problem comes from, and how to solve it. Thanks for helping.
I have a perl program hosted on a windows 7, which is being called by a publishing framework hosted on a linux environment.
This publishing framework has a Java based interface which calls the configured script (perl program calling external officetoPDF) on windows to perform the command-line conversion.
Input files (MS Office files) are copied into windows via an FTP (IIS) for
OfficeToPDF.exe to convert to PDF.
When executed locally on windows command line works fine with file converted to PDF.
When invoked through publishing framework,officetopdf returns below message
Object reference not set to an instance of an object. Did not convert
I have another external program call for non-office ASCII file to binary file conversion inside my perl program which works perfectly fine with publishing framework call.
I have checked the user permission,execute permission on the ms-office file before conversion and path,still not able to get around this issue.
I also tried permission with related workaround with no luck
Have also come across similar issue reported but not answered in this forum
OfficeToPDF not executing via shell_exec
Convert MS-Office to pdf
Any pointer much appreciated
You need to set ms word to execute as a specific user.
To do that, use the DCOMCNFG tool: Start > run DCOMCNFG
Then expand:
Console Root > Component Services > Computers > My COmputer > DCOM COnfig > Microsoft Office Word 97 - 2003 Document
Right click then properties
then Identity tab
and chose: This user. and set it as an admin user.
That worked for me after trying a number of other options.
In my case I was not using perl but using a scheduled task to run a bat file launching a batch process to convert doc* files to pdf using OfficetoPDF. (https://github.com/cognidox/OfficeToPDF) Great tool by the way
Setting the scheduled task to run as a specific user (admin user in my case) was not enough to get around it and the scheduled task was hanging with winword.exe stuck at 99% cpu. But running the bat file directly would work.
Just to confirm user681365's answer. Doing as they suggest with dcomcnfg AND ALSO running your scheduled task or service as the user specified in the configuration with dcomcnfg did the trick for me.
In Win7 I observed that I can rename a running process file name, I searched about it and came across that this feature is introduced so that application itself can update the binary.
I have a windows service and I do not want to allow user to rename it when it is in running state. Please could anyone tell me how can I secure running process file from renaming?
Thanks,
I have a PowerShell v1 script that connects to a remote server via a mapped drive and moves files back and forth the remote server is identified by drive number "M" and also by UNC path REMOTESERVER\DATA:
(M:) \\REMOTESERVER\DATA
When the remote server reboots, I think that I am screwed because now the mapped drive will be inaccessible by the script.
The issue is not when the mapped drive actually disappears, it is that after reboot, authentication is needed and Windows apparently will not remember that.
How is this situation handled programmatically from within a PowerShell script?
Is there a way to reconnect to the mapped drive by writing some PowerShell code?
Just curious how this is accomplished?
I want to create a batch file that will run on windows startup.
I'm running windows 7 professional.
There is a login screen on startup, but I can bypass that if needbe but if I don't have to that would be a bonus.
I would like the batch file to email me through any client, prefrebly hotmail, outlook, gmail, when the PC is turned on.
The reason for wanting this script is i'm accessing my router remotely to turn on my PC via WOL and I would like to be notified in the event is accessed by someone else.
Thanks
Put your batch file or your batch file shortcut in this location
C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
It will make your batch file run as startup which u asked for!!
and it is very difficult or completely impossible to send an email only using a batch file!!
It is only possible via executable file(.exe etc not with cmd).
UPDATE: More over Win10 firewall will not allow such program top exist and work in that way!