Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




CreateProcessWithLogonW() Error 1326 When Starting VBS-File


Hi there

I need to execute a VB-Script as a specific User. I use the RunAsUser()-function which you can find here.

I execute it as following:

Code:
RunAsUser "user", "password", "mydomain", "\chsfile01Projects_Test\__ScriptsProject_NewCustomer.vbs", ""


When executing this code, i get "CreateProcessWithLogonW() failed with error 1326". When i use an EXE-File instead of a VBS it works fine.

What can I do?

Thanks in advance,
Simon




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Sql Server Error 1326
Hi,
When I try to create DSN for server( say DEMO) from server(TEST) I am getting the below error message

Error Message: sql server Error 1326


Pl. help me,
thanks ,
venu kumar.B.

ReSolved - 'Can't Find File DAO350.dll' Error Comes When Open Vb6 Project Or Starting Vb6
Hai ,

I strucked with the problem , it occurs when i try to start the VB or Open the project, i am getting the following error.

Quote:Can't find file DAO350.dll

I don't have any application to run which uses DAO, can any one help me regarding this thank you.

The file DAO350.DLL is located in the following directory

Quote:C:Program FilesCommon FilesMicrosoft SharedDAODAO350.DLL

i tried by registering it manually by giving the below command in the Run box

Code:regsvr32 LoadLibrary("C:Program")failed - The specified module could not be found.'

Yesterday i UnInstalled a Software from my system. I think it removes the DAO350.DLL file, but the removed software is not related to VB6. If u have a application which uses DAO350.DLL, kindly post here, hope running the application can register the DLL properly and after the VB6 could start without the error.

Can any one please help me

Thankyou,
Chock.



Edited by - chs on 8/23/2005 2:15:45 AM

Starting To Pull Hair Out. On Error Ignore Error Control. Help!
Ok i posted about this yesterday and tryed a few things but it still did not work for me.

A runtime popup error occures when the first "If Dir" executes. But only if I do not have access to the share. Even though the "on error" code is there. I have tryed using a goto and label also but that doesn't work either. I have the settings on the general tab set to "Break on unhandled errors"


Code:
On Error Resume Next
If Dir("\" & strServerName & "c$
avupd
avplay.exe") <> "" Then
If Dir("\" & strServerName & "c$
avupd
avplay.exe") <> "" Then
Text = "Installed"
Else
Text = "Not Installed"
End If
Else
Text = "Not Installed"
End If

CreateProcessWithLogonW API
Platform: XP/Vista
Language: Visual Basic 6

Can anyone tell me how to use the CreateProcessWithLogonW API?

I'm an administrator trying to make certain programs run at logon with administration privileges.

I've tried using the group policy editor but the programs still run with user privileges.

The DOS runas command requires a password to be inputted each time which can be annoying.

Any help please?

CreateProcessWithLogonW
I need to run programs on other machines 'as' someone else. I am using the CreateProcessWithLogonW API but can not get the syntax correct. Has anybody else succesfully used this? All my machines are Win2k.

Thanks,
Eric

CreateProcessWithLogonW Alternative In XP SP2
Hi,

As some of you may be aware, it seems as though you can't use the CreateProcessWithLogonW API with Windows XP SP2. What I need to do is run a software installation package as an administrator user from an ordinary user account.

Does anyone have a neat solution or alternative to using the CreateProcessWithLogonW API in XP SP2?

Thanks

Createprocesswithlogonw In Windows 98
Hello!

I have program that uses the createprocesswithlogonw api function, it runs perfectly on W2k but in Windows 98 returns an error. Is there a similar function for Windows 98?


Thanks in advance

Problems With Createprocesswithlogonw
Hi!

I want to run aprocess as another user in visual basic program, but the computers haven't domain and it is in a different workgroup, this function ask for a domain name and I want to know if createprocesswithlogonw works with workgroups. I can't use the UPN format for the users.

Thank you in advance.

Blas

CreateProcessWithLogonW API - How The Hell Do You Use This ?
This is me after looking for some useful documentation on the CreateProcessWithLogonW API call

Can anyone out there supply me with the correct syntax for the DECLARE statement, and also a bit of help on how to use it?

Thanks in advance

*Matt*



Just 1 more tweak and that should be.......OH DAMNIT!

CreateProcessWithLogonW - Not Supported On WIN-XP Sp2, Need Workaround
I'm using the CreateProcessWithLogonW api to create a child procees from a vb appliaction.
It worked ok until i installed win_xp sp2.
I saw in msdn that CreateProcessWithLogonW api is not working in win_xp sp2 or win2003.
I tried to run the CreateProcessAsUesr but it always fail.
Do anyone have a suggestion????
10x,
Oren.

Error Starting VB
Hi,

When I start VB, I get the following message

Can't find file DAO350.dll

and then VB Quits.

I know I have DAO on my computer. Last night, the computer was working fine. I came to work this morning and I get this.

I've never seen this before. Any ideas?

Thanks,

Error Starting VB6
After re-imaging my PC I get a message box from Windows Installer: "Preparing to download" that stays for hours (I left PC overnight) and VB 6 does not start.
What could be the cause of this? VB worked before. Also Visual Source Safe works fine

thnaks

Error Msg When Starting EVB
I have recently installed eVB 3.0 on a new laptop running XP Home. Also installed SDK for Pocket PC 2002. After opening eVB and selecting a platform I get the error message: "Object Library Not Registered". What have I not done? Any thoughts would be appreciated.

Error In First Line, Starting At EA
I am running into a error with this macro...saying EA is an ending statement but it is a name of a file i need to open with this macro.

thanks for the help


Workbooks.OpenText Filename:="X:xfilessha orhldovr"EA" & format(now(), "yymmdd") & ".TXT", Origin
:=437, StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote _
, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:= _
True, Space:=False, Other:=True, OtherChar:=")", FieldInfo:=Array(Array _
(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8 _
, 1), Array(9, 1)), TrailingMinusNumbers:=True

Error In Starting NT Service.
Hi,

I am trying to run my VB application as NT Service. The application keeps checking for the incoming text files in a
particular directory and uploads it to Oracle once it receives one. I am using NT Service control in the application.

I can see my application in the Control Panel ->Services but when I try to start the Service, it gives a run time error
"Error 2140: An Internal Windows NT error occured".

Any help will be appreciated!!!

Thanks
Rajesh.

An Subscript Error On Starting VB 6 0
I have got this question to start with.....I get this error as soon as i launch vb 6.0...

It's an information dialog titled - Visual Component Mangaer.
The eeror is : 'Subscript Out of Range'

This does not effect any application as i know of...but this is annoying. I just want to know what to do to get rid of this. Thanks,

Error Starting An ActivX Dll
Hi All
I have written a simple ActivX Dll in Vb and want to use it from an other VB Program. But when I call a function from the Dll I get the following Error:

Run-time error '403':

Class does not support Automation or does not support expected interface

Can Anyone tell me what I have done wrong.

Error In Starting Up Excel 2003 Because Of Add-In?
Hi,

normally i'm using Office XP, and now i'm using Office 2003. If i'm starting up Excel, this error message comes :
"Cannot open Microsoft Excel Add-In for editing. Please edit the source document instead."

If i deactivate my add-in then this error message doesn't show up in starting up excel. Sometimes after rebooting makes excel no error message too..

In previous versions of Excel (2000 and XP) there are no error messages in starting up Excel.

Is this a bug in Excel 2003?

Receiving Error When Starting Program
Would anyone know how to fix this error???

"Component MSCOMCT2.OCX or One of its dependencies not correctly Registered : A file is missing or invalid"


Thanks

Point Starting Of The File ( Treat As 1st Line Of The File)
Hi all,

let say i have a INI file as below...

[ABC1]
ab=1
ac=2
ad=2

[ABC2]
ab=13
ac=24
ad=25

[ABC3]
ab=1
ac=52
ad=2

when i try to read the file using the below code...

Code:Private Sub Command1_Click()

filename1 = "C:abc.ini"
strHeaderTolookFor = "[ABC2]"

strFooterToLookFor = {[ABC3]"

DataFile1 = FreeFile
Open filename1 For Input As DataFile
Do While Not EOF(DataFile1) And Not EOF(DataFile2)
Line Input #DataFile, LineFile

If InStr(LineFile1, strHeaderTolookFor) Then ' Check to see if the section wanted is reached
      blnSectionFound1 = True
End If

If (blnSectionFound1 = True) Then

'do task

If InStr(LineFile1, strFooterTolookFor) Then ' Check to see if the section wanted is reached
      blnSectionFound1 = False
End If

End If


Loop

Close #DataFile

End Sub



my question is .. from the above do task statement.. how to make the file treat the [ABC2] as the first line of the file
in other words,
ABC2 as the first line
ab=13 (2nd line)
ac=24 (3rd line)
ad=25 (4th line)




Edited by - wtkm on 6/25/2007 7:11:59 AM

Error When Starting VB - Mscomctl.ocx Or One Of Its Dependancies Not Correctly Regis.
I get the error
"mscomctl.ocx or one of its dependancies not correctly registered: a file is missing or invalid" when i startup VB

i click ok, then get the error "Object variable or with block variable not set. Continue?". I click ok and get the error 2 more times. Then i get the error "Automation error. Catastophic failure". and then another "Object variable or with block variable not set. Continue?". Then finally the "New Project.. " window comes up

I notice that i dont have mscomctl.ocx in my system32 folder.. only MSCOMCT2.OCX, MSCOMCTL.[DEP,oca, and SRG]

i downloaded vb6 runtime but it didnt fix the problem

this all started after i ran my virus scanner - i dont know if it deleted something or what happened..

any suggestions?

Starting Batch (name.bat) File From VB
Hi,

I want to start batch file from vb code and after batch file finish it work to continue execution of vb code.

Any suggestions.

Thanks in Advance,

Bezbojnika

Starting An Exe By Clicking On A File
Hi Team

I have text files with the extension ".hzc".

I have registered hzc files on my PC so that when I double click on a hzc file my application starts. But I don't know how to read the information in the hzc file and pass it to the exe as startup parameters.

Can anyone help?

Thanks

FW

Starting My App From A Text File
I have developed a VB.net application that parses an XML file. That part works well. I have figured it out with the registry creating a new file extension that will start my program, but it won't parse the file and display the information. I was wondering how I could open my new file type into my program and have it automatically parse the file and display the information.

I was thinking that maybe there was a parameter, but I don't know what it is.

Starting An Application From A File
Hello,
My question is: How do I get my application to start by double clicking on a
file. I have made my application to save files with a specific extension.
I associated those files to my application through the standard routine of
windows (double clicking, a pop up menu asks me what application I want to
start this file with etc.). However, if I click on a file, it does start
the application but I do not see the contents of the file. Instead, I need
to go to the "File, Open" menu and re-open the file to get all the data. It
is like clicking on a word document and starting MS Word but it is all
blanc.
Could someone please let me know what I need to add to my application to
read the existing files when I double click them so that I don't need to use
the File-Open menu?
Thank you in advance for the help.
J.C.

Starting A Vb-exe File From Html
Hi!
I need to start a VB application i did from a index.html page.
i.e an EXE.
Have tried several examples also with javascript snippets, but noone works.
Any short suggestion?

Starting A File In A Folder That Has Spaces In The Name
Hi there,

I am using VB to write to a CSV file and then open it in Excel once it has finished writing. The code I have used is below:

Call FindExcel.GetExcelLocation

Shell ExcelLocation & " " & App.Path & "Plant.csv", vbMaximizedFocus

This works fine if the Directory structure for App.Path doesn't have any spaces in the name.

When I run it from "c:plant & equipment" excel cannot find the files because it looks for c:plant.xls

If the location of the file including the directory structure has double quotes around it excel opens it OK, but I can't figure out how to get double quotes around App.path + my file name.

Could someone shed some light on how this can be done.

Thanks.

Starting .exe-file After Closing Window Of Appointments
hello

when i close the window of appointments i'd like to have an exe-file opening.
i know how you can open an exe-file but it only has to open when the window is closed and only then.
how do i solve it?

please help me.
pc-er2920

Play A Midi File On Starting The Form
how can i make a midi played when the form start

I Want To Read A File Starting From The Last Line In The Page
I am trying to find a way to read a file starting from the last line in the page, reason why I Want to do that, because this file is always updated and I am watching this file to do something when it find an specific errors. The word could be found in more then one place in the file, by reading the last line this way I don't have to worry if this same error existed before in the file.

Any help is appreciated.

Thanks

Starting Internet Explorer And Open File
Hello,

Can someone help me with the following?

How can I start Internet explorer and open a file (eg. html document, picture,...) in it?
Do I need special references or so?

Thanks for your help.


Christophe

Starting VB 6 Is Starting To Install Access
I just started having this problem today.

Whenever I try to start VB 6, it trys to install Access 2002. Not sure why. I am not using Access, but it is on my machine.

Starting A Vb-application, By Starting Another Programm
Hello professionals,
I have written a small, but quite good application in VB and I want it to start automaticly, when the user is starting another programm, like InternetExplorer or NetscapeNavigator. My is question: How can I achieve that?

Thanks in advance
and please send my a mail!

Starting A New Line: Yes Another Text File Question: ANother One Resolved!
this piece of code makes a line in a text file BUT - the user has to put in more than one line (probably about 20) so how would i get it to add a new line each time they press the same button?

Any insight greatly appreciated
xxxx

Starting My Program By Double Clicking A Text File
i have been using vb.net system.environment.commandline to determine if my program was started by double clicking a file with an extension .xxx or if my program's .exe file was opened. if the program was started by the .xxx file then the commandline value would have a .xxx extension.

the problem is when i use xp everything works well, but when i try to install it on a 2000 server machine the commandline is always the same, the .exe location.

i have tried using the system.environment.currentdirectory but it doesn't return the exact file path.

any suggestions....

Starting A Slide Show As The File Opens.. Vba Powerpoint
Im new here and wondering if anyone could help me out. I'm familiar with VBA in excel, but I am using it on PowerPoint for the first time. I wanted to know if it is possible to have a slide show start when the file is opened, so that say a user wouldn't have to go to Slide Show>View Show. any suggestions would be very helpful... thank you

kevin

Write In A Text File, On A Line Starting With Character Number...
Hi. I am trying to write in a text file more strings as shown bellow:
111 444 1234
1 32 4
12 2323 232

The thing is that the length of the strings is not always the same. How to can i do this?
Thank you very much!

API "CreateProcessWithLogonW " Problems With 2000 And XP
API function CreateProcessWithLogonW(responsible
for invoke Stunst6.exe) was runing in Windows2000 and WindowsXP.
After modifications of operating system environment were made, using ServicePacks:
1.Windows XP Hotfix (SP)[See Q282010 for more information]
2.Windows XP Hotfix (SP)[See Q307869 for more information]
.................................
9.Windows XP Hotfix (SP)[See Q320552 for more information]
this API function doesn't create a new process.
I receive error  msg:
"CreateProcessWithlogon() failed with error 1326 "
Please,help me!!!!!


HELP: "Out Of Memory" Error (and More) When Starting Visual Basic 6.0
Let me first start by saying that I am using WinXP and have been working with Visual Basic 6.0 for a few weeks now without any problems. Everytime I am done with it, I save the project and close the Visual Basic 6.0 window.

I wanted to work on my project last night, so I double-clicked on my desktop icon for Visual Basic V6.0 to open it up which I always did before) but this time I get the following errors (shown in order as they come up):

Error 1) Out of Memory : Continue? (I click YES button)
Error 2) Object Variable or With Block Variable Not Set: Continue? (I click YES button)
Error 3) Object Variable or With Block Variable Not Set: Continue? (I click YES button)
Error 4) Object Variable or With Block Variable Not Set: Continue? (I click YES button)
Error 5) Automation Error Catastrophic Failure (I click OK button)
Error 6) Object Variable or With Block Variable Not Set: Continue? (I click YES button)

After error (6), the Visual Basic 6.0 window does come up and I can open my project, edit the project, click RUN to test/debug my project and save my project.

Can someone please tell me what in the world is going on? Why do I have these errors all of sudden on opening up the application and what should I do to correct the problems?


Also, there were two other things I noticed:

- I tried to access the MSDN Library for Visual Basic 6.0 (via the Help menu) but discovered that the help library has disappeared. The other MSDN libraries (Visual C++ , etc..) were still there, but the Visual Basic 6.0 one was gone. A window gets displayed telling me to reinstall the library from disc

- When I first started my project, I added some controls via the Components menu option. Two of these controls(RICHTX32.OCX and COMDLG32.OCX) I added but never used yet. I decided to use a richTextBox last night and realized that the richTextBox icon in the control window (or is it called the component window), as well as the Common Dialog icon, were changed to a plain white folder icon. Usually these icons would be seen as image icons. Anyway, I tried to drag a richTextBox in the Form and was told that it could not found (or something like that).








Edited by - uncletr on 6/19/2004 3:41:59 PM

"ERROR" This Is Starting To Annoy Me
Row cannot be located for updating. Some values may have been changed since it was last read.

That is the error message that i keep getting, and i cannot figure out what to do about it, i get the message on any attempt i make at updating an ado recordset, moveing it, resync, i can do a cancelupdate, but of course that clears the last changes i have just made to it.
I have checked the editmode and it is '1' or adEditInProgress.

Can any one tell me how i can update the record set and then move to the next one with out getting an error.

I am doing this all throughout my program but only on this one spot am i getting this error.

Here is the code i use

Code:
adoalarm("MsgSent") = True

adoalarm.update
if not adoalarm.eof then adoalarm.movenext
any help would be great thanks

Get A Handle To A Windows File Editor When Starting Program From Within Another Program
Hi,
I am trying to make a program that starts another program, and using sendkeyes to control what the new program is going to do and then close it. Basically the new program is going to open a db and store some data in a notepad file from the db.
I know how to start another program from within a program using shell, but

1) I do not want the new program to fill the screen like it does now. I know hat you can start the program and minimize it so the program icon shows at the bottom of the screen on the same line as the start button. But I would prefer the new program to not show. Can anyone help me with this ?

2) At one point in the process when using sendkeyes, the new program automatically opens/fetches a Windows list (where you can specify the name of the file and where it is going to be stored on your computer).
I need to find a way to get a grip on that windows list from my own program, so I can send a standard file name to it.
How can I do that?



Edited by - kolibri1 on 9/25/2003 1:33:40 PM

Get A Handle To A Windows File Editor When Starting Progr. From Within Other Progr.
Hi,
I am trying to make a program that starts another program, and using sendkeyes to control what the new program is going to do and then close it. Basically the new program is going to open a db and store some data in a notepad file from the db.
I know how to start another program from within a program using shell, but

1) I do not want the new program to fill the screen like it does now. I know hat you can start the program and minimize it so the program icon shows at the bottom of the screen on the same line as the start button. But I would prefer the new program to not show. Can anyone help me with this ?

2) At one point in the process when using sendkeyes, the new program automatically opens/fetches a Windows list (where you can specify the name of the file and where it is going to be stored on your computer).
I need to find a way to get a grip on that windows list from my own program, so I can send a standard file name to it.
How can I do that?

Microsoft Visual Basic File Not Found Error When Openining Excel. Error 53
Hi

I am getting the below message each time I open excel:

Microsoft visual basic File not found error when openining excel. Error 53



What is it,What caused it and how do I get rid of this message when I open excel.


I have a series of macros in VBA and a VB6.0 application.


Many thanks

Package And Deployment : Error 75 : Path/file Access Error
I am trying to build a setup package for a VB 6 project. I get a "Unexpected error 75:Path/file access error" and
writing setup.lst goes on forever.
I tried to remove all references but the error still persists. Could somebody please let me know what could be the possible solution to this.
Thanks.

RunTime Error 75: Path/File Access Error.
Hi all,

This is blowing my mind!

I have the following piece of code which I have been testing:-


Code:
file_name = "C:Documents and SettingsHomeDesktopTest1.xls"
save_to = "D:Test1_(" & Format(Now, "dd-mmm-yyyy") & " " & Format(Now, "hh_mm_ss") & ") " & ".xls"

FileCopy file_name, save_to
I have run the code 14 times (on separate cd's) and it's copied the file to the cd drive ("D:") every single time.

All of a sudden, I am getting a RunTime Error 75: Path/File access error . Why?

If I manually copy and paste to the D drive it works. I use FileCopy, it returns an error. I change the path from D to C, it works. I have searched millions of sites and cannot find an answer.

Thanks in advance,
Paul.

RunTime Error :75 Path/file Access Error
the error message "RunTime error :75 path/file access error" appear in my application , the error raised not for all clients( all win2000/winXP ),the clients that have the user name that contains dot character( eg Moh.issam) have this error, but the users that hav nor contain dot character (eg Moh ) have not the error .

the error occured when i open the connection.

Thanks

Run Time Error: 75 - Path/File Access Error
Hi,

I have packaged a program with the Deployment Wizard, and have installed the program on my computer for testing. However when I go to run my app error 75 - Path/File access error pops up. Is it possible that the wizard has packaged a .ocx file or something that is used by some other application in windows 98? Or could it be something in my code? Thanks

Run-time Error 75 (path/file Access Error)
I am using a common dialog to search for a file, but when I click on Cancel and there is no filename in the filename field of the common dialog, I get the error on the highlighted line:

Error:

Quote:





Run-time error '75':
Path/File access error.






VB Code:
Private Sub cmdImportDatabaseConnectionString_Click()    With cdlgImportDatabaseFile        .CancelError = False        .DialogTitle = "Import Database Connection Settings"        .Filter = "Database File (*.dbs)|*.dbs"        .ShowOpen        m_strFileName = .FileName    End With        [hl]FileCopy m_strFileName, App.Path & "" & m_strFileName & ".dbs"[/hl]End Sub

Run-time Error '75': Path/file Access Error
So I tried to create a program that created a folder in the Windows directory and then copied a certain file to that newly created directory. I have accomplished this, oddly, on my computer only. When I send the program to others to use they receive this error:


Code:
[run-time error '75'....path/file access error]


Anybody seem to know the problem?

I will paste partial code if needed.

Copyright 2005-08 www.BigResource.com, All rights reserved