View Single Post
Old 16th July 2012, 09:31   #7
Junior Member
Join Date: Jul 2012
Posts: 8
Error Opening File

First thing thank you for the replys, ive tryied to implement the code as below, but im still running into problems:

1st Massage box : i get Number: 227633266688 this is a random number:
2nd Massage box : i get Number: 25769803776
then i get an Error message "Error opening file for writing"

So i wondering if this is a permission thing? - not so sure of this as TestAdmin have full access rights on the c:\

PHP Code:
### User Impersanation 
!define USERNAME "TestAdmin"
!define PASSWORD "password1"

!define LOGON32_LOGON_NETWORK           3
!define LOGON32_LOGON_BATCH             4
!define LOGON32_LOGON_SERVICE           5
!define LOGON32_LOGON_UNLOCK            7

!define LOGON32_PROVIDER_WINNT35    1
!define LOGON32_PROVIDER_WINNT40    2
!define LOGON32_PROVIDER_WINNT50    3

!define LogonUser "advapi32::LogonUserA(t, t, t, i, i, *l) l"
!define ImpersonateLoggedOnUser "advapi32::ImpersonateLoggedOnUser(l)l"
!define RevertToSelf "advapi32::RevertToSelf() l" 

Section "App Applications" App_Applications

SetPluginUnload alwaysoff
::Call '${RevertToSelf}.r0'
System::Call "${LogonUser}('${USERNAME}', '${DOMAIN}', '${PASSWORD}', ${LOGON32_LOGON_INTERACTIVE}${LOGON32_PROVIDER_DEFAULT}, .r2) .r0"
messagebox mb_ok $0
::Call '${ImpersonateLoggedOnUser}(r2) .r0' 
messagebox mb_ok $0

  setOutPath $INSTDIR
#Program Files
file /"C:\App_Platform\Output\Debug\" 

    System::Call '

Last edited by dr_awol; 16th July 2012 at 09:56. Reason: setOutPath $INSTDIRApp_Applications = setOutPath $INSTDIR\App_Applications
dr_awol is offline   Reply With Quote